1
0
mirror of https://github.com/codership/wsrep-lib.git synced 2025-07-28 20:02:00 +03:00

Updated wsrep-API, added -Wconversion to compiler flags, fixed errors.

This commit is contained in:
Teemu Ollakka
2019-10-10 13:54:05 +03:00
parent 58aa3e821f
commit 477a71dd46
18 changed files with 107 additions and 88 deletions

View File

@ -61,8 +61,9 @@ void db::storage_engine::transaction::rollback()
void db::storage_engine::bf_abort_some(const wsrep::transaction& txc)
{
std::uniform_int_distribution<size_t> uniform_dist(0, alg_freq_);
wsrep::unique_lock<wsrep::mutex> lock(mutex_);
if (alg_freq_ && (std::rand() % alg_freq_) == 0)
if (alg_freq_ && uniform_dist(random_engine_) == 0)
{
if (transactions_.empty() == false)
{