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

Implemented dbsim high prio service log_dummy_write_set()

The empty implementation of log_dummy_write_set() in dbsim
high priority service implementation left unreleased commit
order critical section behind whenever remote write set failed
certification. Added calls to do empty commit to release the
critical section.

Other:

Implemented ostream operator<< for wsrep:🧵:id, and added
printout of owning thread into transaction debug output.
This commit is contained in:
Teemu Ollakka
2019-01-24 13:34:15 +02:00
parent f30d9c06ce
commit fc5f59d27e
6 changed files with 55 additions and 5 deletions

View File

@ -89,6 +89,23 @@ void db::high_priority_service::after_apply()
client_.client_state_.after_applying();
}
int db::high_priority_service::log_dummy_write_set(
const wsrep::ws_handle& ws_handle,
const wsrep::ws_meta& ws_meta)
{
int ret(client_.client_state_.start_transaction(ws_handle, ws_meta));
assert(ret == 0);
client_.client_state_.prepare_for_ordering(ws_handle, ws_meta, true);
ret = client_.client_state_.before_commit();
assert(ret == 0);
ret = client_.client_state_.ordered_commit();
assert(ret == ret);
ret = client_.client_state_.after_commit();
assert(ret == 0);
client_.client_state_.after_applying();
return ret;
}
bool db::high_priority_service::is_replaying() const
{
return (client_.client_state_.transaction().state() == wsrep::transaction::s_replaying);

View File

@ -52,8 +52,7 @@ namespace db
void switch_execution_context(wsrep::high_priority_service&) override
{ }
int log_dummy_write_set(const wsrep::ws_handle&,
const wsrep::ws_meta&) override
{ return 0; }
const wsrep::ws_meta&) override;
bool is_replaying() const override;
void debug_crash(const char*) override { }
private: