Skip to content

Commit

Permalink
Merge pull request #837 from Expensify/master
Browse files Browse the repository at this point in the history
Update expensify_prod branch
  • Loading branch information
johnmlee101 authored Aug 6, 2020
2 parents cf0ebaf + 58680a9 commit 20dfb68
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sqlitecluster/SQLiteNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ void SQLiteNode::replicate(SQLiteNode& node, Peer* peer, SData command, SQLite&
// up-to-date. ASYNC transactions can start as soon as the DB is at `dbCountAtStart` (the same value that
// the DB was at when the transaction began on leader).
bool quorum = !SStartsWith(command["ID"], "ASYNC");
uint64_t waitForCount = SStartsWith(command["ID"], "ASYNC") ? command.calc("dbCountAtStart") : currentCount;
uint64_t waitForCount = SStartsWith(command["ID"], "ASYNC") ? command.calcU64("dbCountAtStart") : currentCount;
SINFO("Thread for commit " << newCount << " waiting on DB count " << waitForCount << " (" << (quorum ? "QUORUM" : "ASYNC") << ")");
while (true) {
SQLiteSequentialNotifier::RESULT result = node._localCommitNotifier.waitFor(waitForCount);
Expand Down Expand Up @@ -354,7 +354,7 @@ void SQLiteNode::_sendOutstandingTransactions() {
}
string& query = get<0>(i.second);
string& hash = get<1>(i.second);
int64_t dbCountAtStart = get<2>(i.second);
uint64_t dbCountAtStart = get<2>(i.second);
SData transaction("BEGIN_TRANSACTION");
transaction["NewCount"] = to_string(id);
transaction["NewHash"] = hash;
Expand Down

0 comments on commit 20dfb68

Please sign in to comment.