From 1c9ada59ccbf000f8abd97a2efbb19ed2008b34c Mon Sep 17 00:00:00 2001 From: Maysam Yabandeh Date: Thu, 4 Jan 2018 11:10:03 -0800 Subject: [PATCH] Remove assert(s.ok()) from ::DeleteFile Summary: DestroyDB that is used in tests loops over the files returned by ::GetChildren and delete them one by one. Such files might be already deleted in the file system (during DeleteObsoleteFileImpl for example) but will get actually deleted with a delay sometimes before ::DeleteFile is called on the file name. We have some test failures where FaultInjectionTestEnv::DeleteFile fails on assert(s.ok()) during DestroyDB. This patch removes the assert statement to fix that. Closes https://github.com/facebook/rocksdb/pull/3324 Differential Revision: D6659545 Pulled By: maysamyabandeh fbshipit-source-id: 4c9552fbcd494dcf3e61d475c11fc965c4388b2c --- utilities/transactions/transaction_test.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/utilities/transactions/transaction_test.h b/utilities/transactions/transaction_test.h index 400ca0106..61d5d1f63 100644 --- a/utilities/transactions/transaction_test.h +++ b/utilities/transactions/transaction_test.h @@ -72,6 +72,11 @@ class TransactionTest : public ::testing::TestWithParam< ~TransactionTest() { delete db; + // This is to skip the assert statement in FaultInjectionTestEnv. There + // seems to be a bug in btrfs that the makes readdir return recently + // unlink-ed files. By using the default fs we simply ignore errors resulted + // from attempting to delete such files in DestroyDB. + options.env = Env::Default(); DestroyDB(dbname, options); delete env; }