You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by al...@apache.org on 2023/10/19 16:36:21 UTC
[kudu] 02/02: Small refactor to use DirManager::WaitOnClosures()
This is an automated email from the ASF dual-hosted git repository.
alexey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git
commit 7b8766880698e003f54e514dfc0c72442d67559d
Author: Yingchun Lai <la...@apache.org>
AuthorDate: Thu Oct 19 20:53:30 2023 +0800
Small refactor to use DirManager::WaitOnClosures()
Change-Id: Ib2f2ca771f444ac149c7f27ef364c07c8efbb8c7
Reviewed-on: http://gerrit.cloudera.org:8080/20596
Tested-by: Kudu Jenkins
Reviewed-by: Alexey Serbin <al...@apache.org>
---
src/kudu/fs/log_block_manager-test.cc | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/src/kudu/fs/log_block_manager-test.cc b/src/kudu/fs/log_block_manager-test.cc
index 05bbe9e43..f0c491a52 100644
--- a/src/kudu/fs/log_block_manager-test.cc
+++ b/src/kudu/fs/log_block_manager-test.cc
@@ -503,9 +503,7 @@ TEST_P(LogBlockManagerTest, MetricsTest) {
{0, &METRIC_log_block_manager_dead_containers_deleted} }));
}
// Wait for the actual hole punching to take place.
- for (const auto& data_dir : dd_manager_->dirs()) {
- data_dir->WaitOnClosures();
- }
+ dd_manager_->WaitOnClosures();
NO_FATALS(CheckLogMetrics(new_entity,
{ {9 * 1024, &METRIC_log_block_manager_bytes_under_management},
{10, &METRIC_log_block_manager_blocks_under_management},
@@ -2177,9 +2175,7 @@ TEST_P(LogBlockManagerTest, TestDoNotDeleteFakeDeadContainer) {
}
ASSERT_OK(transaction->CommitDeletedBlocks(nullptr));
transaction.reset();
- for (const auto& data_dir : dd_manager_->dirs()) {
- data_dir->WaitOnClosures();
- }
+ dd_manager_->WaitOnClosures();
}
// Close and reset the writer.
@@ -2255,9 +2251,7 @@ TEST_P(LogBlockManagerTest, TestHalfPresentContainer) {
transaction->AddDeletedBlock(block_id);
ASSERT_OK(transaction->CommitDeletedBlocks(nullptr));
transaction.reset();
- for (const auto& data_dir : dd_manager_->dirs()) {
- data_dir->WaitOnClosures();
- }
+ dd_manager_->WaitOnClosures();
};
const auto CheckOK = [&] () {