mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-07-24 10:42:31 +03:00
In order to avoid potential deadlocks, release client_state lock when
calling server state methods which may acquire server_state mutex. Fixed compilation errors in release mode.
This commit is contained in:
@ -88,6 +88,7 @@
|
||||
#include "view.hpp"
|
||||
#include "transaction_id.hpp"
|
||||
#include "provider.hpp"
|
||||
#include "compiler.hpp"
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
@ -488,7 +489,8 @@ namespace wsrep
|
||||
return state(lock);
|
||||
}
|
||||
|
||||
enum state state(wsrep::unique_lock<wsrep::mutex>& lock) const
|
||||
enum state state(wsrep::unique_lock<wsrep::mutex>&
|
||||
lock WSREP_UNUSED) const
|
||||
{
|
||||
assert(lock.owns_lock());
|
||||
return state_;
|
||||
|
@ -18,8 +18,8 @@
|
||||
*/
|
||||
|
||||
/** @file transaction.hpp */
|
||||
#ifndef WSREP_TRANSACTION_CONTEXT_HPP
|
||||
#define WSREP_TRANSACTION_CONTEXT_HPP
|
||||
#ifndef WSREP_TRANSACTION_HPP
|
||||
#define WSREP_TRANSACTION_HPP
|
||||
|
||||
#include "provider.hpp"
|
||||
#include "server_state.hpp"
|
||||
@ -175,7 +175,7 @@ namespace wsrep
|
||||
int certify_fragment(wsrep::unique_lock<wsrep::mutex>&);
|
||||
int certify_commit(wsrep::unique_lock<wsrep::mutex>&);
|
||||
int append_sr_keys_for_commit();
|
||||
void streaming_rollback();
|
||||
void streaming_rollback(wsrep::unique_lock<wsrep::mutex>&);
|
||||
void clear_fragments();
|
||||
void cleanup();
|
||||
void debug_log_state(const char*) const;
|
||||
@ -227,4 +227,4 @@ namespace wsrep
|
||||
|
||||
}
|
||||
|
||||
#endif // WSREP_TRANSACTION_CONTEXT_HPP
|
||||
#endif // WSREP_TRANSACTION_HPP
|
||||
|
Reference in New Issue
Block a user