Skip to content

Commit

Permalink
Merge pull request #1750 from Expensify/tyler-journal-diagnostic-logging
Browse files Browse the repository at this point in the history
Updated logging for diagnosing journal conflicts.
  • Loading branch information
tylerkaraszewski authored May 29, 2024
2 parents 083d4f3 + 72421c4 commit 1e74396
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions sqlitecluster/SQLite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ bool SQLite::beginTransaction(TRANSACTION_TYPE type) {
// Reset before the query, as it's possible the query sets these.
_autoRolledBack = false;

SDEBUG("[concurrent] Beginning transaction");
SINFO("[concurrent] Beginning transaction");
uint64_t before = STimeNow();
_insideTransaction = !SQuery(_db, "starting db transaction", "BEGIN CONCURRENT");

Expand Down Expand Up @@ -719,7 +719,7 @@ int SQLite::commit(const string& description, function<void()>* preCheckpointCal
result = SQuery(_db, "committing db transaction", "COMMIT");
_lastConflictPage = _conflictPage;
if (_lastConflictPage) {
SINFO("part of last conflcit page: " << _lastConflictPage);
SINFO("part of last conflict page: " << _lastConflictPage);
}

// If there were conflicting commits, will return SQLITE_BUSY_SNAPSHOT
Expand Down Expand Up @@ -772,7 +772,7 @@ int SQLite::commit(const string& description, function<void()>* preCheckpointCal
}
SINFO(description << " COMMIT complete in " << time << ". Wrote " << (endPages - startPages)
<< " pages. WAL file size is " << sz << " bytes. " << _queryCount << " queries attempted, " << _cacheHits
<< " served from cache.");
<< " served from cache. Used journal " << _journalName);
_queryCount = 0;
_cacheHits = 0;
_dbCountAtStart = 0;
Expand Down
2 changes: 1 addition & 1 deletion sqlitecluster/SQLite.h
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ class SQLite {
// Pointer to our SharedData object, which is shared between all SQLite DB objects for the same file.
SharedData& _sharedData;

// The name of the journal table that this particular DB handle with write to.
// The name of the journal table that this particular DB handle will write to.
string _journalName;

// The current size of the journal, in rows. TODO: Why isn't this in SharedData?
Expand Down

0 comments on commit 1e74396

Please sign in to comment.