rocksdb icon indicating copy to clipboard operation
rocksdb copied to clipboard

rocksdb enter fatal error model after recovery from no space error

Open lee-qiu opened this issue 5 months ago • 0 comments

See https://github.com/facebook/rocksdb/issues/11643.

I found that when the disk free size is large enough, the db calls the db_->ResumeImpl() function, but if the memory buffer is empty, the SwitchMemtable() function is not triggered.

So rocksdb will not create a new wal file. When the next write request comes, the write to wal file will get a IOStatus::IOError("Writer has previous error.") error, which makes the engine get a fatal error and you must reopen the database to recover.

I wanna know can we trigger SwitchMemtable() function when the flush reason is "kErrorRecovery" and memory buffer is empty?

I found that can help me to escape from the above fatal error. I'd like to make a push request to resolve this issue If you guys agree it.

Waiting for your reply.

lee-qiu avatar Sep 06 '24 09:09 lee-qiu