Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#23243] docdb : Followup fix for "Fix tablet bootstrap stuck when re…
…playing truncate operation" Summary: Following the changes in D37152, RocksDB could be shut down before the `TransactionLoader::Executor` object is destroyed. This may cause the tserver process to crash during table truncation shutting down RocksDB, due to an unexpected reference count on the SuperVersion object. The crash is triggered by the following failed check: ``` column_family.cc:456] Check failed: is_last_reference ``` The root cause is that the `regular_iterator_` within TransactionLoader::Executor hold references to RocksDB's SuperVersion. To resolve this issue, we propose resetting regular and intent iterators before release the RocksDB scoped pending operation counter lock. It is safe to reset the iterators since they are no longer in use later. Jira: DB-12175 Test Plan: ./yb_build.sh --cxx-test pgwrapper_pg_single_tserver-test --gtest_filter PgSingleTServerTest.BootstrapReplayTruncate Reviewers: rthallam, asrivastava, timur, bkolagani, sergei Reviewed By: bkolagani, sergei Subscribers: ybase, yql, mbautin Differential Revision: https://phorge.dev.yugabyte.com/D38568
- Loading branch information