From c3105aa50da0bce4f72947fc032bfc016e17f2b2 Mon Sep 17 00:00:00 2001 From: Siying Dong Date: Fri, 2 Nov 2018 17:22:37 -0700 Subject: [PATCH] Try to fix ExternalSSTFileTest.IngestNonExistingFile flakines (#4625) Summary: ExternalSSTFileTest.IngestNonExistingFile occasionally fail for number of SST files after manual compaction doesn't go down as expected. Although I don't find a reason how this can happen, adding an extra waiting to make sure obsolete file purging has finished before we check the files doesn't hurt. Pull Request resolved: https://github.com/facebook/rocksdb/pull/4625 Differential Revision: D12910586 Pulled By: siying fbshipit-source-id: 2a5ddec6908c99cf3bcc78431c6f93151c2cab59 --- db/external_sst_file_test.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/db/external_sst_file_test.cc b/db/external_sst_file_test.cc index 089f6a678..5c41cbb8b 100644 --- a/db/external_sst_file_test.cc +++ b/db/external_sst_file_test.cc @@ -1317,7 +1317,8 @@ TEST_F(ExternalSSTFileTest, IngestNonExistingFile) { ASSERT_OK(Flush()); ASSERT_OK(db_->CompactRange(CompactRangeOptions(), nullptr, nullptr)); - + ASSERT_OK(dbfull()->TEST_WaitForCompact(true)); + // After full compaction, there should be only 1 file. std::vector files; env_->GetChildren(dbname_, &files);