From 691a361dc95a707e2492bb9573098405db3897e1 Mon Sep 17 00:00:00 2001 From: xwduan Date: Mon, 14 Aug 2023 11:43:54 -0700 Subject: [PATCH] Generate txn id for each event --- service/history/ndc/history_replicator.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/service/history/ndc/history_replicator.go b/service/history/ndc/history_replicator.go index d9f10abe93e..d81edc0594c 100644 --- a/service/history/ndc/history_replicator.go +++ b/service/history/ndc/history_replicator.go @@ -739,7 +739,7 @@ func (r *HistoryReplicatorImpl) applyNonStartEventsToNonCurrentBranchWithoutCont return err } - transactionID, err := r.shard.GenerateTaskID() + transactionIDs, err := r.shard.GenerateTaskIDs(len(task.getEvents())) if err != nil { return err } @@ -752,7 +752,7 @@ func (r *HistoryReplicatorImpl) applyNonStartEventsToNonCurrentBranchWithoutCont RunID: task.getExecution().GetRunId(), BranchToken: versionHistory.GetBranchToken(), PrevTxnID: 0, // TODO @wxing1292 events chaining will not work for backfill case - TxnID: transactionID, + TxnID: transactionIDs[i], Events: events, } }