[improvement](transaction) txn prune memory after visible (#27128)
This commit is contained in:
@ -173,6 +173,7 @@ public class PublishVersionDaemon extends MasterDaemon {
|
||||
for (PublishVersionTask task : transactionState.getPublishVersionTasks().values()) {
|
||||
AgentTaskQueue.removeTask(task.getBackendId(), TTaskType.PUBLISH_VERSION, task.getSignature());
|
||||
}
|
||||
transactionState.pruneAfterVisible();
|
||||
if (MetricRepo.isInit) {
|
||||
long publishTime = transactionState.getLastPublishVersionTime() - transactionState.getCommitTime();
|
||||
MetricRepo.HISTO_TXN_PUBLISH_LATENCY.update(publishTime);
|
||||
|
||||
@ -748,6 +748,12 @@ public class TransactionState implements Writable {
|
||||
return this.errMsg;
|
||||
}
|
||||
|
||||
// reduce memory
|
||||
public void pruneAfterVisible() {
|
||||
publishVersionTasks.clear();
|
||||
tableIdToTotalNumDeltaRows.clear();
|
||||
}
|
||||
|
||||
public void setSchemaForPartialUpdate(OlapTable olapTable) {
|
||||
// the caller should hold the read lock of the table
|
||||
isPartialUpdate = true;
|
||||
|
||||
Reference in New Issue
Block a user