From 2581c0a5a18dda0fe15055db6f8bace4546c8483 Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Fri, 3 Nov 2017 10:22:50 -0700 Subject: [PATCH] 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 --- utilities/blob_db/blob_db_test.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/utilities/blob_db/blob_db_test.cc b/utilities/blob_db/blob_db_test.cc index b036c0208..708cec5c7 100644 --- a/utilities/blob_db/blob_db_test.cc +++ b/utilities/blob_db/blob_db_test.cc @@ -883,6 +883,7 @@ TEST_F(BlobDBTest, SnapshotAndGarbageCollection) { if (i == 0 || i == 3 || (i == 2 && delete_key)) { // The snapshot shouldn't see data in bfile ASSERT_EQ(num_files - 1, blob_db_impl()->TEST_GetBlobFiles().size()); + blob_db_->ReleaseSnapshot(snapshot); } else { // The snapshot will see data in bfile, so the file shouldn't be deleted ASSERT_EQ(num_files, blob_db_impl()->TEST_GetBlobFiles().size());