Skip to content

Commit 9c4b94b

Browse files
jowlyzhangfacebook-github-bot
authored andcommitted
Remove flaky test for file ingestion wait time metric (facebook#13605)
Summary: As titled. Pull Request resolved: facebook#13605 Test Plan: This is removing a test Reviewed By: mszeszko-meta Differential Revision: D74660230 Pulled By: jowlyzhang fbshipit-source-id: 9c1d46b56d2f9ee43eba645563d4f954645d1ace
1 parent 35e1c6c commit 9c4b94b

1 file changed

Lines changed: 0 additions & 49 deletions

File tree

db/external_sst_file_basic_test.cc

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -260,55 +260,6 @@ TEST_F(ExternalSSTFileBasicTest, Basic) {
260260
s = sst_file_writer.DeleteRange(Key(100), Key(200));
261261
ASSERT_NOK(s) << s.ToString();
262262

263-
DestroyAndReopen(options);
264-
265-
SyncPoint::GetInstance()->LoadDependency({
266-
{"DBImpl::IngestExternalFile:AfterIncIngestFileCounter",
267-
"ExternalSSTFileBasicTest.LiveWriteStart"},
268-
{"WriteThread::JoinBatchGroup:Wait",
269-
"DBImpl::IngestExternalFile:AfterIncIngestFileCounter:2"},
270-
});
271-
SyncPoint::GetInstance()->EnableProcessing();
272-
PerfContext* write_thread_perf_context;
273-
std::thread write_thread([&] {
274-
TEST_SYNC_POINT("ExternalSSTFileBasicTest.LiveWriteStart");
275-
SetPerfLevel(kEnableWait);
276-
write_thread_perf_context = get_perf_context();
277-
write_thread_perf_context->Reset();
278-
ASSERT_OK(db_->Put(WriteOptions(), "bar", "v2"));
279-
ASSERT_GT(write_thread_perf_context->write_thread_wait_nanos, 0);
280-
// Test sync points were used to make sure this live write enter write
281-
// thread after the file ingestion entered write thread. So by the time this
282-
// live write finishes, the latest seqno is 1 means file ingestion used
283-
// seqno 0.
284-
ASSERT_EQ(db_->GetLatestSequenceNumber(), 1U);
285-
});
286-
287-
// Add file using file path
288-
SetPerfLevel(kEnableTimeExceptForMutex);
289-
PerfContext* perf_ctx = get_perf_context();
290-
perf_ctx->Reset();
291-
s = DeprecatedAddFile({file1});
292-
ASSERT_GT(perf_context.file_ingestion_nanos, 0);
293-
ASSERT_GT(perf_context.file_ingestion_blocking_live_writes_nanos, 0);
294-
ASSERT_OK(s) << s.ToString();
295-
for (int k = 0; k < 100; k++) {
296-
ASSERT_EQ(Get(Key(k)), Key(k) + "_val");
297-
}
298-
299-
write_thread.join();
300-
SyncPoint::GetInstance()->DisableProcessing();
301-
302-
// Re-ingest the file just to check the perf context not enabled at and below
303-
// kEnableWait.
304-
SetPerfLevel(kEnableWait);
305-
perf_ctx->Reset();
306-
IngestExternalFileOptions opts;
307-
opts.allow_global_seqno = true;
308-
opts.allow_blocking_flush = true;
309-
ASSERT_OK(db_->IngestExternalFile({file1}, opts));
310-
ASSERT_EQ(perf_context.file_ingestion_nanos, 0);
311-
ASSERT_EQ(perf_context.file_ingestion_blocking_live_writes_nanos, 0);
312263
DestroyAndRecreateExternalSSTFilesDir();
313264
}
314265

0 commit comments

Comments
 (0)