1
0
mirror of https://github.com/codership/wsrep-lib.git synced 2025-07-27 09:01:50 +03:00

Remove method transaction::clear_fragments()

Remove the method as it does nothing, except for calling
`streaming_context_.clear()`. This led to a situation where we have
two ways to do the same thing, and it is annoying, if one wants to search
for all places where streaming_context is cleaned up.
This commit is contained in:
Daniele Sciascia
2021-07-06 11:23:38 +02:00
parent 209c214fc6
commit c45b1eff94
2 changed files with 4 additions and 10 deletions

View File

@ -251,7 +251,6 @@ namespace wsrep
int release_commit_order(wsrep::unique_lock<wsrep::mutex>&); int release_commit_order(wsrep::unique_lock<wsrep::mutex>&);
void streaming_rollback(wsrep::unique_lock<wsrep::mutex>&); void streaming_rollback(wsrep::unique_lock<wsrep::mutex>&);
int replay(wsrep::unique_lock<wsrep::mutex>&); int replay(wsrep::unique_lock<wsrep::mutex>&);
void clear_fragments();
void cleanup(); void cleanup();
void debug_log_state(const char*) const; void debug_log_state(const char*) const;
void debug_log_key_append(const wsrep::key& key) const; void debug_log_key_append(const wsrep::key& key) const;

View File

@ -629,7 +629,7 @@ int wsrep::transaction::after_commit()
client_state_.server_state_.stop_streaming_client(&client_state_); client_state_.server_state_.stop_streaming_client(&client_state_);
lock.lock(); lock.lock();
} }
clear_fragments(); streaming_context_.cleanup();
} }
switch (client_state_.mode()) switch (client_state_.mode())
@ -767,7 +767,7 @@ int wsrep::transaction::after_rollback()
if (is_streaming() && state() != s_must_replay) if (is_streaming() && state() != s_must_replay)
{ {
clear_fragments(); streaming_context_.cleanup();
} }
if (state() == s_aborting) if (state() == s_aborting)
@ -1903,7 +1903,7 @@ int wsrep::transaction::replay(wsrep::unique_lock<wsrep::mutex>& lock)
} }
if (is_streaming()) if (is_streaming())
{ {
clear_fragments(); streaming_context_.cleanup();
} }
provider().release(ws_handle_); provider().release(ws_handle_);
break; break;
@ -1913,7 +1913,7 @@ int wsrep::transaction::replay(wsrep::unique_lock<wsrep::mutex>& lock)
if (is_streaming()) if (is_streaming())
{ {
client_service_.remove_fragments(); client_service_.remove_fragments();
clear_fragments(); streaming_context_.cleanup();
} }
state(lock, s_aborted); state(lock, s_aborted);
ret = 1; ret = 1;
@ -1929,11 +1929,6 @@ int wsrep::transaction::replay(wsrep::unique_lock<wsrep::mutex>& lock)
return ret; return ret;
} }
void wsrep::transaction::clear_fragments()
{
streaming_context_.cleanup();
}
void wsrep::transaction::cleanup() void wsrep::transaction::cleanup()
{ {
debug_log_state("cleanup_enter"); debug_log_state("cleanup_enter");