Skip to content

Commit

Permalink
Update comment on max_valid_backups_to_open (facebook#6105)
Browse files Browse the repository at this point in the history
Summary:
To reflect changes in PR facebook#6072

This comment also implies that a seemingly valid use-case for
max_valid_backups_to_open is flawed: even if you only want to add a new
backup without trying to delete, you might need to clean up after a
backup creation that never finished. To clean up properly requires
opening all backups to get proper ref counts on shared files.
Pull Request resolved: facebook#6105

Test Plan: code comment only

Differential Revision: D18736716

Pulled By: pdillinger

fbshipit-source-id: 2447c0000eefe3a4ca606926bfe922a8456b0cb7
  • Loading branch information
pdillinger authored and facebook-github-bot committed Nov 27, 2019
1 parent 09fcf4f commit e8f997c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions include/rocksdb/utilities/backupable_db.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,13 @@ struct BackupableDBOptions {
// Default: 4194304
uint64_t callback_trigger_interval_size;

// When Open() is called, it will open at most this many of the latest
// non-corrupted backups.
// For BackupEngineReadOnly, Open() will open at most this many of the
// latest non-corrupted backups.
//
// Note setting this to a non-default value prevents old files from being
// deleted in the shared directory, as we can't do proper ref-counting. If
// using this option, make sure to occasionally disable it (by resetting to
// INT_MAX) and run GarbageCollect to clean accumulated stale files.
// Note: this setting is ignored (behaves like INT_MAX) for any kind of
// writable BackupEngine because it would inhibit accounting for shared
// files for proper backup deletion, including purging any incompletely
// created backups on creation of a new backup.
//
// Default: INT_MAX
int max_valid_backups_to_open;
Expand Down

0 comments on commit e8f997c

Please sign in to comment.