Ryan4253 commented on PR #3022: URL: https://github.com/apache/kvrocks/pull/3022#issuecomment-2959384308
@git-hulk Thanks for the review! Disabling the WAL does risk data loss on process crash, but is can also (theoretically) increase write throughput by 2x, and we think this is a worthwhile tradeoff. This means we must flush all memtables to ensure data integrity on shutdown. Currently, this happens in ```rocksdb::DbImpl```'s destructor which is called unpredictably after we send SIGTERM or redis SHUTDOWN. If the shutdown takes a long time, we can't distinguish between a hung process or a long shutdown, which means we can't guarantee data integrity. With a synchronous flush memtable command we can explicitly trigger the flush and wait for it to finish to ensure safe shutdown. Having an async flush memtable command also means we can more eagerly schedule flushes to reduce the window of data loss. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
