rocksdb icon indicating copy to clipboard operation
rocksdb copied to clipboard

log spamming in db_impl_files.cc

Open dfa1 opened this issue 3 years ago • 4 comments

Expected behavior

No warnings.

Actual behavior

Log spamming, with the following 2 messages repeated hundreds of times per day:

[/db_impl/db_impl_files.cc:94] File Deletions Enable, but not really enabled. Counter: 1 [/db_impl/db_impl_files.cc:54] File Deletions Disabled, but already disabled. Counter: 1

Steps to reproduce the behavior

We are using Rocksdb in Java (6.2xx): these logs are happening even with a simple unit test with open a database, write some keys, then close it.

dfa1 avatar May 18 '22 05:05 dfa1

We're seeing this too, we recently upgraded to 7.2.1 from and earlier 6.x version.

anelson avatar May 23 '22 17:05 anelson

I have inspected the source code, and it looks like a RocksDB bug. If opts.wal_size_for_flush > 0, CreateCheckpoint call tree looks like this: -Status CheckpointImpl::CreateCheckpoint -- db_->DisableFileDeletions() <- Disable file deletions first time. Counter: 1 -- CheckpointImpl::CreateCustomCheckpoint() --- GetLiveFilesStorageInfo() ---- DBImpl::GetLiveFilesStorageInfo() ----- GetSortedWalFiles() ------DisableFileDeletions() <-- Disable file deletions second time. Counter: 2. Reports warning that they are already(still) disabled ------ ..... ------EnableFileDeletions() <-- Counter: 1. Report another warning that they were not fully enabled

DisableFileDeletions() works based on a counter incremented on each call and decremented on EnableFileDeletions(). As long as these two calls are executed within the same call stack and it's a counter, double disabling is legal and shouldn't be treated as a warning.

kostiantyn-povnych avatar May 23 '22 19:05 kostiantyn-povnych

I confirm that it is happening as soon as a checkpoint is created. Thank you @kostiantyn-povnych for the analysis!

dfa1 avatar May 24 '22 06:05 dfa1

hello :) this is still happening in our setup (reading from checkpoints)... any chance to see this fixed? @ajkr @pdillinger

dfa1 avatar May 13 '24 13:05 dfa1