Skip to content

Commit

Permalink
Generate txn id for each event
Browse files Browse the repository at this point in the history
  • Loading branch information
xwduan committed Aug 14, 2023
1 parent aa5c3db commit 691a361
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions service/history/ndc/history_replicator.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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,
}
}
Expand Down

0 comments on commit 691a361

Please # to comment.