diff --git a/fdbserver/KeyValueStoreSQLite.actor.cpp b/fdbserver/KeyValueStoreSQLite.actor.cpp index a39e8ddb8d..be43041686 100644 --- a/fdbserver/KeyValueStoreSQLite.actor.cpp +++ b/fdbserver/KeyValueStoreSQLite.actor.cpp @@ -1361,13 +1361,12 @@ void SQLiteDB::open(bool writable) { if (walFile.isError()) throw walFile.getError(); // If we've failed to open the file, throw an exception // Set Rate control if FLOW_KNOBS are positive - if (SERVER_KNOBS->SQLITE_CACHEDFILE_WRITE_WINDOW_LIMIT > 0 && - SERVER_KNOBS->SQLITE_CACHEDFILE_WRITE_WINDOW_SECONDS > 0) { + if (SERVER_KNOBS->SQLITE_WRITE_WINDOW_LIMIT > 0 && SERVER_KNOBS->SQLITE_WRITE_WINDOW_SECONDS > 0) { // The writer thread is created before the readers, so it should initialize the rate controls. if(writable) { // Create a new rate control and assign it to both files. - Reference rc(new SpeedLimit(SERVER_KNOBS->SQLITE_CACHEDFILE_WRITE_WINDOW_LIMIT, - SERVER_KNOBS->SQLITE_CACHEDFILE_WRITE_WINDOW_SECONDS)); + Reference rc( + new SpeedLimit(SERVER_KNOBS->SQLITE_WRITE_WINDOW_LIMIT, SERVER_KNOBS->SQLITE_WRITE_WINDOW_SECONDS)); dbFile.get()->setRateControl(rc); walFile.get()->setRateControl(rc); } else { diff --git a/fdbserver/Knobs.cpp b/fdbserver/Knobs.cpp index 7cbc44a07c..062ef79315 100644 --- a/fdbserver/Knobs.cpp +++ b/fdbserver/Knobs.cpp @@ -251,15 +251,15 @@ ServerKnobs::ServerKnobs(bool randomize, ClientKnobs* clientKnobs, bool isSimula init( SQLITE_CHUNK_SIZE_PAGES, 25600 ); // 100MB init( SQLITE_CHUNK_SIZE_PAGES_SIM, 1024 ); // 4MB init( SQLITE_READER_THREADS, 64 ); // number of read threads - init( SQLITE_CACHEDFILE_WRITE_WINDOW_SECONDS, -1 ); - init( SQLITE_CACHEDFILE_WRITE_WINDOW_LIMIT, -1 ); + init( SQLITE_WRITE_WINDOW_SECONDS, -1 ); + init( SQLITE_WRITE_WINDOW_LIMIT, -1 ); if( randomize && BUGGIFY ) { // Choose an window between .01 and 1.01 seconds. - SQLITE_CACHEDFILE_WRITE_WINDOW_SECONDS = 0.01 + deterministicRandom()->random01(); + SQLITE_WRITE_WINDOW_SECONDS = 0.01 + deterministicRandom()->random01(); // Choose 10k to 50k operations per second int opsPerSecond = deterministicRandom()->randomInt(1000, 5000); // Set window limit to opsPerSecond scaled down to window size - SQLITE_CACHEDFILE_WRITE_WINDOW_LIMIT = opsPerSecond * SQLITE_CACHEDFILE_WRITE_WINDOW_SECONDS; + SQLITE_WRITE_WINDOW_LIMIT = opsPerSecond * SQLITE_WRITE_WINDOW_SECONDS; } // Maximum and minimum cell payload bytes allowed on primary page as calculated in SQLite. diff --git a/fdbserver/Knobs.h b/fdbserver/Knobs.h index 045b4ccf5c..00d153e164 100644 --- a/fdbserver/Knobs.h +++ b/fdbserver/Knobs.h @@ -223,8 +223,8 @@ public: int SQLITE_CHUNK_SIZE_PAGES; int SQLITE_CHUNK_SIZE_PAGES_SIM; int SQLITE_READER_THREADS; - int SQLITE_CACHEDFILE_WRITE_WINDOW_LIMIT; - double SQLITE_CACHEDFILE_WRITE_WINDOW_SECONDS; + int SQLITE_WRITE_WINDOW_LIMIT; + double SQLITE_WRITE_WINDOW_SECONDS; // KeyValueStoreSqlite spring cleaning double SPRING_CLEANING_NO_ACTION_INTERVAL;