Skip to content

Commit

Permalink
Merge branch 'tyler-single-thread-replicate' into tyler-hctree-test
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerkaraszewski committed Jan 16, 2025
2 parents 4e5a3bc + 7dc927c commit 8252084
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sqlitecluster/SQLiteNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1572,15 +1572,15 @@ void SQLiteNode::_onMESSAGE(SQLitePeer* peer, const SData& message) {
return;
}

bool replicationRunning = false;
bool isReplicationRunning = false;
{
lock_guard<mutex> lock(_replicateMutex);
if (!_shouldReplicateThreadExit) {
_replicateQueue.push(make_pair(peer, message));
replicationRunning = true;
isReplicationRunning = true;
}
}
if (replicationRunning) {
if (isReplicationRunning) {
if (!_replicateThread) {
_replicateThread = new thread(&SQLiteNode::_replicate, this);
}
Expand Down

0 comments on commit 8252084

Please sign in to comment.