diff --git a/sqlitecluster/SQLite.cpp b/sqlitecluster/SQLite.cpp index 461b14717..7d8627d3f 100644 --- a/sqlitecluster/SQLite.cpp +++ b/sqlitecluster/SQLite.cpp @@ -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; }