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
The following commit(s) were added to refs/heads/master by this push:
new e26209804 Revert "KUDU-3651 fix race condition in
TabletReplica::Stop()"
e26209804 is described below
commit e2620980425571f5a941bfa6fe73326a9885a73f
Author: Alexey Serbin <[email protected]>
AuthorDate: Fri Mar 14 23:12:52 2025 +0000
Revert "KUDU-3651 fix race condition in TabletReplica::Stop()"
This reverts commit b75641714e469da060dcd8f2447b7c7b984bce6e.
This patch was pushed out-of-the-order (should be preceded by
https://gerrit.cloudera.org/#/c/22614/) and now the build is broken.
Let's reverting this patch and submit the patches in proper order.
Change-Id: Id324c47aec0812956111ca964e0590ee6073f20b
Reviewed-on: http://gerrit.cloudera.org:8080/22628
Reviewed-by: Abhishek Chennaka <[email protected]>
Tested-by: Alexey Serbin <[email protected]>
---
src/kudu/tablet/tablet_replica.cc | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/src/kudu/tablet/tablet_replica.cc
b/src/kudu/tablet/tablet_replica.cc
index 3fe8608cd..e89d3c65e 100644
--- a/src/kudu/tablet/tablet_replica.cc
+++ b/src/kudu/tablet/tablet_replica.cc
@@ -344,24 +344,13 @@ void TabletReplica::Stop() {
if (consensus_) consensus_->Stop();
- // First, close the prepare pool token, so no new operations can be accepted
- // by the replica, and then start waiting for existing in-flight
- // operations to complete. Otherwise, there would be a race condition
- // if the token were still active after returning
- // from op_tracker_.WaitForAllToFinish() call.
- if (prepare_pool_token_) {
- prepare_pool_token_->Close();
- }
-
// TODO(KUDU-183): Keep track of the pending tasks and send an "abort"
message.
LOG_SLOW_EXECUTION(WARNING, 1000,
Substitute("TabletReplica: tablet $0: Waiting for Ops to complete",
tablet_id())) {
op_tracker_.WaitForAllToFinish();
}
+
if (prepare_pool_token_) {
- // In debug builds, make sure no queued operations are still pending.
- DCHECK(prepare_pool_token_->WaitFor(MonoDelta::FromSeconds(0)));
- // Explicitly shutdown the token.
prepare_pool_token_->Shutdown();
}