From 4126ac97f7b97c9f44c694c77bc39d95bce45076 Mon Sep 17 00:00:00 2001 From: Peter Zhang Date: Tue, 8 Jul 2025 11:04:42 +0800 Subject: [PATCH] add commont --- node/storage/src/log_store/log_manager.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/node/storage/src/log_store/log_manager.rs b/node/storage/src/log_store/log_manager.rs index 70ab032..ad04bfb 100644 --- a/node/storage/src/log_store/log_manager.rs +++ b/node/storage/src/log_store/log_manager.rs @@ -351,6 +351,10 @@ impl LogStoreWrite for LogManager { .tx_store .get_tx_seq_list_by_data_root(&tx.data_merkle_root)?; // Check if there are other same-root transaction not finalized. + // TODO: it will increase read load, so we can only copy in two situations + // 1. if the tx is the first tx with this data root, copy to other tx_seqs + // 2. if it's in the middle of a tx sequence, copy only to the first tx_seq + // although, some tx_seqs may not be finalized, it won't affect the data integrity. self.copy_tx_and_finalize(tx_seq, same_root_seq_list)?; metrics::FINALIZE_TX_WITH_HASH.update_since(start_time);