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:
@ -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()
|
||||
|
@ -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();
|
||||
|
||||
|
Reference in New Issue
Block a user