Skip to content

Commit

Permalink
Remove unused variables
Browse files Browse the repository at this point in the history
  • Loading branch information
flodnv committed Jan 14, 2025
1 parent 8869b6e commit 1af671d
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions sqlitecluster/SQLite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -677,11 +677,9 @@ bool SQLite::prepare(uint64_t* transactionID, string* transactionhash) {
// where this journal in particular has accumulated a large backlog.
static const size_t deleteLimit = 10;
if (minJournalEntry < oldestCommitToKeep) {
auto startUS = STimeNow();
shared_lock<shared_mutex> lock(_sharedData.writeLock);
string query = "DELETE FROM " + _journalName + " WHERE id < " + SQ(oldestCommitToKeep) + " LIMIT " + SQ(deleteLimit);
SASSERT(!SQuery(_db, "Deleting oldest journal rows", query));
size_t deletedCount = sqlite3_changes(_db);
}

// We lock this here, so that we can guarantee the order in which commits show up in the database.
Expand Down

0 comments on commit 1af671d

Please sign in to comment.