[fix](fe) remove table from waitToCommitTxnCountMap in CloudGlobalTransactionMgr when drop table - #59757
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
There was a problem hiding this comment.
Pull request overview
This pull request fixes a resource leak in CloudGlobalTransactionMgr where table metadata was not properly cleaned up when tables are dropped. Additionally, it simplifies the internal data structure by removing unnecessary nesting of maps that used database IDs as keys.
Changes:
- Renamed
clearTableLastTxnIdtoafterDropTableand added cleanup forwaitToCommitTxnCountMap - Simplified
lastTxnIdMapfromMap<Long, Map<Long, Long>>(dbId -> tableId -> txnId) toMap<Long, Long>(tableId -> txnId) - Simplified
txnLastSignatureMapfromMap<Long, Map<Long, Long>>(dbId -> txnId -> signature) toMap<Long, Long>(txnId -> signature) - Changed several methods from public to private as they are only used internally
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| InternalCatalog.java | Updated to call the renamed afterDropTable method instead of clearTableLastTxnId when dropping tables in cloud mode |
| CloudGlobalTransactionMgr.java | Refactored map data structures to remove database ID nesting, added cleanup of waitToCommitTxnCountMap in afterDropTable, and changed visibility of internal methods to private |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
run buildall |
TPC-H: Total hot run time: 32227 ms |
TPC-DS: Total hot run time: 173303 ms |
|
PR approved by anyone and no changes requested. |
|
PR approved by at least one committer and no changes requested. |
…nsactionMgr when drop table (apache#59757) ### What problem does this PR solve? 1. `CloudGlobalTransactionMgr` does not remove `waitToCommitTxnCountMap` if table is dropped. 2. simplify `lastTxnIdMap` and `txnLastSignatureMap`
…nsactionMgr when drop table (apache#59757) ### What problem does this PR solve? 1. `CloudGlobalTransactionMgr` does not remove `waitToCommitTxnCountMap` if table is dropped. 2. simplify `lastTxnIdMap` and `txnLastSignatureMap`
What problem does this PR solve?
CloudGlobalTransactionMgrdoes not removewaitToCommitTxnCountMapif table is dropped.lastTxnIdMapandtxnLastSignatureMapIssue Number: close #xxx
Related PR: #xxx
Problem Summary:
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)