Compare commits
1 Commits
saml-authe
...
fix_finali
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ed29168723 |
@@ -215,11 +215,11 @@ bool ReplicationStorageClient::FinalizeTransactionReplication(Storage *storage,
|
|||||||
MG_ASSERT(replica_stream_, "Missing stream for transaction deltas");
|
MG_ASSERT(replica_stream_, "Missing stream for transaction deltas");
|
||||||
try {
|
try {
|
||||||
auto response = replica_stream_->Finalize();
|
auto response = replica_stream_->Finalize();
|
||||||
return replica_state_.WithLock([storage, &response, db_acc = std::move(db_acc), this](auto &state) mutable {
|
return replica_state_.WithLock([storage, response, db_acc = std::move(db_acc), this](auto &state) mutable {
|
||||||
replica_stream_.reset();
|
replica_stream_.reset();
|
||||||
if (!response.success || state == replication::ReplicaState::RECOVERY) {
|
if (!response.success || state == replication::ReplicaState::RECOVERY) {
|
||||||
state = replication::ReplicaState::RECOVERY;
|
state = replication::ReplicaState::RECOVERY;
|
||||||
client_.thread_pool_.AddTask([storage, &response, db_acc = std::move(db_acc), this] {
|
client_.thread_pool_.AddTask([storage, response, db_acc = std::move(db_acc), this] {
|
||||||
this->RecoverReplica(response.current_commit_timestamp, storage);
|
this->RecoverReplica(response.current_commit_timestamp, storage);
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user