Blob DB: Fix BlobDBTest::SnapshotAndGarbageCollection asan failure
Summary: Fix unreleased snapshot at the end of the test. Closes https://github.com/facebook/rocksdb/pull/3126 Differential Revision: D6232867 Pulled By: yiwu-arbug fbshipit-source-id: 651ca3144fc573ea2ab0ab20f0a752fb4a101d26
This commit is contained in:
parent
17f67b5462
commit
2584a18efb
@ -883,6 +883,7 @@ TEST_F(BlobDBTest, SnapshotAndGarbageCollection) {
|
|||||||
if (i == 0 || i == 3 || (i == 2 && delete_key)) {
|
if (i == 0 || i == 3 || (i == 2 && delete_key)) {
|
||||||
// The snapshot shouldn't see data in bfile
|
// The snapshot shouldn't see data in bfile
|
||||||
ASSERT_EQ(num_files - 1, blob_db_impl()->TEST_GetBlobFiles().size());
|
ASSERT_EQ(num_files - 1, blob_db_impl()->TEST_GetBlobFiles().size());
|
||||||
|
blob_db_->ReleaseSnapshot(snapshot);
|
||||||
} else {
|
} else {
|
||||||
// The snapshot will see data in bfile, so the file shouldn't be deleted
|
// The snapshot will see data in bfile, so the file shouldn't be deleted
|
||||||
ASSERT_EQ(num_files, blob_db_impl()->TEST_GetBlobFiles().size());
|
ASSERT_EQ(num_files, blob_db_impl()->TEST_GetBlobFiles().size());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user