Skip to content

Commit

Permalink
Merge pull request #1709 from Expensify/main
Browse files Browse the repository at this point in the history
Update expensify_prod branch
  • Loading branch information
chiragsalian authored May 5, 2024
2 parents 327fa41 + 875ad14 commit 61512ef
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions sqlitecluster/SQLite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,12 @@ bool SQLite::prepare(uint64_t* transactionID, string* transactionhash) {

// We lock this here, so that we can guarantee the order in which commits show up in the database.
if (!_mutexLocked) {
auto start = STimeNow();
_sharedData.commitLock.lock();
auto end = STimeNow();
if (end - start > 5'000'000) {
SINFO("Waited " << (end - start) << "us for commit lock.");
}
_sharedData._commitLockTimer.start("SHARED");
_mutexLocked = true;
}
Expand Down

0 comments on commit 61512ef

Please sign in to comment.