Clarify VerifyBackup behavior

Summary:
It's non-obvious to users that using the same backup engine for creating/verifying provides better results than using separate backup engines, so add a comment in header.
Closes https://github.com/facebook/rocksdb/pull/1942

Differential Revision: D4637865

Pulled By: ajkr

fbshipit-source-id: e6efe24
This commit is contained in:
Andrew Kryczka 2017-03-02 17:17:06 -08:00 committed by Facebook Github Bot
parent 6fb9013441
commit 0ad5af42d0

View file

@ -227,6 +227,12 @@ class BackupEngineReadOnly {
// checks that each file exists and that the size of the file matches our // checks that each file exists and that the size of the file matches our
// expectations. it does not check file checksum. // expectations. it does not check file checksum.
//
// If this BackupEngine created the backup, it compares the files' current
// sizes against the number of bytes written to them during creation.
// Otherwise, it compares the files' current sizes against their sizes when
// the BackupEngine was opened.
//
// Returns Status::OK() if all checks are good // Returns Status::OK() if all checks are good
virtual Status VerifyBackup(BackupID backup_id) = 0; virtual Status VerifyBackup(BackupID backup_id) = 0;
}; };