From 6a4acf1c788c4bc485263241b9708c2c86e00fcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Canna=C3=B2?= Date: Thu, 16 Mar 2023 09:04:05 +0000 Subject: [PATCH] Revert "Commit on debug_log every 10 seconds" This reverts commit 5461eb0529d7bfd7f54df8b26bdb562024882081. --- lib/debug.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/lib/debug.cpp b/lib/debug.cpp index f84445d7e..f19984eb3 100644 --- a/lib/debug.cpp +++ b/lib/debug.cpp @@ -31,7 +31,6 @@ static pthread_rwlock_t filters_rwlock; static SQLite3DB * debugdb_disk = NULL; sqlite3_stmt *statement1=NULL; static unsigned int debug_output = 1; -static unsigned long long last_checkpoint = 0; #endif /* DEBUG */ /* @@ -214,12 +213,6 @@ void proxy_debug_func(enum debug_module module, int verbosity, int thr, const ch } } if (write_to_disk == true) { - if (last_checkpoint == 0 || (curtime > last_checkpoint + 10*1000*1000)) { - // commit every 10 seconds - last_checkpoint = curtime; - db->execute("COMMIT"); - db->execute("BEGIN"); - } rc=(*proxy_sqlite3_bind_int64)(statement1, 1, curtime); ASSERT_SQLITE_OK(rc, db); rc=(*proxy_sqlite3_bind_int64)(statement1, 2, curtime-pretime); ASSERT_SQLITE_OK(rc, db); rc=(*proxy_sqlite3_bind_int64)(statement1, 3, thr); ASSERT_SQLITE_OK(rc, db);