rocksdb
rocksdb copied to clipboard
log spamming in db_impl_files.cc
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.
We're seeing this too, we recently upgraded to 7.2.1 from and earlier 6.x version.
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.
I confirm that it is happening as soon as a checkpoint is created. Thank you @kostiantyn-povnych for the analysis!
hello :) this is still happening in our setup (reading from checkpoints)... any chance to see this fixed? @ajkr @pdillinger