@@ -56,16 +56,17 @@ type (
5656 numHistoryShards int32
5757 activityContext context.Context
5858
59- executionManager persistence.ExecutionManager
60- registry namespace.Registry
61- historyClient historyservice.HistoryServiceClient
62- adminClient adminservice.AdminServiceClient
63- executor executor.Executor
64- rateLimiter quotas.RateLimiter
65- perShardQPS dynamicconfig.IntPropertyFn
66- executionDataDurationBuffer dynamicconfig.DurationPropertyFn
67- metricsHandler metrics.Handler
68- logger log.Logger
59+ executionManager persistence.ExecutionManager
60+ registry namespace.Registry
61+ historyClient historyservice.HistoryServiceClient
62+ adminClient adminservice.AdminServiceClient
63+ executor executor.Executor
64+ rateLimiter quotas.RateLimiter
65+ perShardQPS dynamicconfig.IntPropertyFn
66+ executionDataDurationBuffer dynamicconfig.DurationPropertyFn
67+ enableHistoryEventIDValidator dynamicconfig.BoolPropertyFn
68+ metricsHandler metrics.Handler
69+ logger log.Logger
6970
7071 stopC chan struct {}
7172 stopWG sync.WaitGroup
@@ -89,6 +90,7 @@ func NewScavenger(
8990 perShardQPS dynamicconfig.IntPropertyFn ,
9091 executionDataDurationBuffer dynamicconfig.DurationPropertyFn ,
9192 executionTaskWorker dynamicconfig.IntPropertyFn ,
93+ enableHistoryEventIDValidator dynamicconfig.BoolPropertyFn ,
9294 executionManager persistence.ExecutionManager ,
9395 registry namespace.Registry ,
9496 historyClient historyservice.HistoryServiceClient ,
@@ -112,10 +114,11 @@ func NewScavenger(
112114 rateLimiter : quotas .NewDefaultOutgoingRateLimiter (
113115 func () float64 { return float64 (perHostQPS ()) },
114116 ),
115- perShardQPS : perShardQPS ,
116- executionDataDurationBuffer : executionDataDurationBuffer ,
117- metricsHandler : metricsHandler .WithTags (metrics .OperationTag (metrics .ExecutionsScavengerScope )),
118- logger : logger ,
117+ perShardQPS : perShardQPS ,
118+ executionDataDurationBuffer : executionDataDurationBuffer ,
119+ enableHistoryEventIDValidator : enableHistoryEventIDValidator ,
120+ metricsHandler : metricsHandler .WithTags (metrics .OperationTag (metrics .ExecutionsScavengerScope )),
121+ logger : logger ,
119122
120123 stopC : make (chan struct {}),
121124 }
@@ -185,6 +188,7 @@ func (s *Scavenger) run() {
185188 s .rateLimiter ,
186189 }),
187190 s .executionDataDurationBuffer ,
191+ s .enableHistoryEventIDValidator ,
188192 ))
189193 if ! submitted {
190194 s .logger .Error ("unable to submit task to executor" , tag .ShardID (shardID ))
0 commit comments