mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-07-28 20:02:00 +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:
@ -13,6 +13,7 @@ add_library(wsrep-lib
|
||||
seqno.cpp
|
||||
view.cpp
|
||||
server_state.cpp
|
||||
thread.cpp
|
||||
transaction.cpp
|
||||
wsrep_provider_v26.cpp)
|
||||
target_link_libraries(wsrep-lib wsrep_api_v26 pthread dl)
|
||||
|
30
src/thread.cpp
Normal file
30
src/thread.cpp
Normal file
@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Copyright (C) 2019 Codership Oy <info@codership.com>
|
||||
*
|
||||
* This file is part of wsrep-lib.
|
||||
*
|
||||
* Wsrep-lib is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Wsrep-lib is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with wsrep-lib. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "wsrep/thread.hpp"
|
||||
|
||||
#include <ostream>
|
||||
|
||||
std::ostream& wsrep::operator<<(std::ostream& os, const wsrep::thread::id& id)
|
||||
{
|
||||
std::ios_base::fmtflags orig_flags(os.flags());
|
||||
os << std::hex << id.thread_;
|
||||
os.flags(orig_flags);
|
||||
return os;
|
||||
}
|
@ -758,8 +758,6 @@ int wsrep::transaction::after_statement()
|
||||
ret = provider().commit_order_enter(ws_handle_, ws_meta_);
|
||||
if (ret == 0)
|
||||
{
|
||||
// client_state_.server_state().last_committed_gtid(
|
||||
// ws_meta.gtid());
|
||||
provider().commit_order_leave(ws_handle_, ws_meta_);
|
||||
}
|
||||
}
|
||||
@ -1550,6 +1548,7 @@ void wsrep::transaction::debug_log_state(
|
||||
<< ", bytes: " << streaming_context_.bytes_certified()
|
||||
<< ", sr_rb: " << streaming_context_.rolled_back()
|
||||
<< "\n own: " << (client_state_.owning_thread_id_ == wsrep::this_thread::get_id())
|
||||
<< " thread_id: " << client_state_.owning_thread_id_
|
||||
<< "");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user