mirror of https://github.com/facebook/rocksdb.git
Don't warn on (recursive) disable file deletion (#12310)
Summary: To stop spamming our warning logs with normal behavior. Also fix comment on `DisableFileDeletions()`. In response to https://github.com/facebook/rocksdb/issues/12001 I've indicated my objection to granting legitimacy to force=true, but I'm not addressing that here and now. In short, the user shouldn't be asked to think about whether they want to use the *wrong* behavior. ;) Pull Request resolved: https://github.com/facebook/rocksdb/pull/12310 Test Plan: existing tests Reviewed By: jowlyzhang Differential Revision: D53233117 Pulled By: pdillinger fbshipit-source-id: 5d2aedb76b02b30f8a5fa5b436fc57fde5d40d6e
This commit is contained in:
parent
b10c171e58
commit
2b4245559c
|
@ -52,7 +52,7 @@ Status DBImpl::DisableFileDeletions() {
|
|||
if (my_disable_delete_obsolete_files == 1) {
|
||||
ROCKS_LOG_INFO(immutable_db_options_.info_log, "File Deletions Disabled");
|
||||
} else {
|
||||
ROCKS_LOG_WARN(immutable_db_options_.info_log,
|
||||
ROCKS_LOG_INFO(immutable_db_options_.info_log,
|
||||
"File Deletions Disabled, but already disabled. Counter: %d",
|
||||
my_disable_delete_obsolete_files);
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ Status DBImpl::EnableFileDeletions(bool force) {
|
|||
PurgeObsoleteFiles(job_context);
|
||||
}
|
||||
} else {
|
||||
ROCKS_LOG_WARN(immutable_db_options_.info_log,
|
||||
ROCKS_LOG_INFO(immutable_db_options_.info_log,
|
||||
"File Deletions Enable, but not really enabled. Counter: %d",
|
||||
saved_counter);
|
||||
}
|
||||
|
|
|
@ -1643,11 +1643,6 @@ class DB {
|
|||
// The sequence number of the most recent transaction.
|
||||
virtual SequenceNumber GetLatestSequenceNumber() const = 0;
|
||||
|
||||
// Prevent file deletions. Compactions will continue to occur,
|
||||
// but no obsolete files will be deleted. Calling this multiple
|
||||
// times have the same effect as calling it once.
|
||||
virtual Status DisableFileDeletions() = 0;
|
||||
|
||||
// Increase the full_history_ts of column family. The new ts_low value should
|
||||
// be newer than current full_history_ts value.
|
||||
// If another thread updates full_history_ts_low concurrently to a higher
|
||||
|
@ -1659,9 +1654,14 @@ class DB {
|
|||
virtual Status GetFullHistoryTsLow(ColumnFamilyHandle* column_family,
|
||||
std::string* ts_low) = 0;
|
||||
|
||||
// Enable deleting obsolete files.
|
||||
// Usually users should only need to call this if they have previously called
|
||||
// `DisableFileDeletions`.
|
||||
// Suspend deleting obsolete files. Compactions will continue to occur,
|
||||
// but no obsolete files will be deleted. To resume file deletions, each
|
||||
// call to DisableFileDeletions() must be matched by a subsequent call to
|
||||
// EnableFileDeletions(). For more details, see EnableFileDeletions().
|
||||
virtual Status DisableFileDeletions() = 0;
|
||||
|
||||
// Resume deleting obsolete files, following up on `DisableFileDeletions()`.
|
||||
//
|
||||
// File deletions disabling and enabling is not controlled by a binary flag,
|
||||
// instead it's represented as a counter to allow different callers to
|
||||
// independently disable file deletion. Disabling file deletion can be
|
||||
|
|
Loading…
Reference in New Issue