From 4b7544574ce9c1b685ddc396e7d4157002035768 Mon Sep 17 00:00:00 2001 From: Yu Xia Date: Fri, 20 Nov 2020 12:45:58 -1000 Subject: [PATCH] Patch a change to support reset 2dc workflow (#3778) --- service/history/execution/mutable_state_builder.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/service/history/execution/mutable_state_builder.go b/service/history/execution/mutable_state_builder.go index 0f66ddf5129..58257d5be38 100644 --- a/service/history/execution/mutable_state_builder.go +++ b/service/history/execution/mutable_state_builder.go @@ -530,6 +530,11 @@ func (e *mutableStateBuilder) UpdateCurrentVersion( func (e *mutableStateBuilder) GetCurrentVersion() int64 { + // TODO: remove this after all 2DC workflows complete + if e.replicationState != nil { + return e.replicationState.CurrentVersion + } + if e.versionHistories != nil { return e.currentVersion }