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

Call before/after prepare from before_commit() when 1PC

before_prepare() call prepares removal SR fragments from stable
storage and the logic should be duplicated in before_commit()
otherwise.
This commit is contained in:
Teemu Ollakka
2018-06-13 13:04:33 +03:00
parent a7adcb01ba
commit f07885e204
4 changed files with 17 additions and 17 deletions

View File

@ -262,14 +262,16 @@ namespace wsrep
}
int before_prepare()
{
wsrep::unique_lock<wsrep::mutex> lock(mutex_);
assert(state_ == s_exec);
return transaction_.before_prepare();
return transaction_.before_prepare(lock);
}
int after_prepare()
{
wsrep::unique_lock<wsrep::mutex> lock(mutex_);
assert(state_ == s_exec);
return transaction_.after_prepare();
return transaction_.after_prepare(lock);
}
int before_commit()

View File

@ -98,9 +98,9 @@ namespace wsrep
int after_row();
int before_prepare();
int before_prepare(wsrep::unique_lock<wsrep::mutex>&);
int after_prepare();
int after_prepare(wsrep::unique_lock<wsrep::mutex>&);
int before_commit();