Skip to content

Commit 4a826ce

Browse files
committed
Address the rest of the review comments
1 parent d28e7ec commit 4a826ce

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

common/dynamicconfig/constants.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ const (
214214
// This setting allows some propogation delay of versioning data, which may happen for the following reasons:
215215
// 1. There are no workflows currently marked as open in the visibility store but a worker for the demoted version
216216
// is currently processing a task.
217-
// 2. There are delays in the asynchrnous visiblity task processor.
217+
// 2. There are delays in the visibility task processor (which is asynchronous).
218218
// 3. There's propagation delay of the versioning data between matching nodes.
219219
RemovableBuildIdDurationSinceDefault = "worker.removableBuildIdDurationSinceDefault"
220220

common/util/util.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@ func FilterSlice[T any](in []T, predicate func(T) bool) []T {
144144
return out
145145
}
146146

147-
// ReduceSliceInitial reduces a slice using given reducer function and initial value.
148-
func ReduceSliceInitial[T any, A any](in []T, initializer A, reducer func(A, T) A) A {
147+
// ReduceSlice reduces a slice using given reducer function and initial value.
148+
func ReduceSlice[T any, A any](in []T, initializer A, reducer func(A, T) A) A {
149149
acc := initializer
150150
for _, val := range in {
151151
acc = reducer(acc, val)

service/frontend/task_reachability.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ func (wh *WorkflowHandler) getTaskQueueReachability(ctx context.Context, request
187187
reachableByNewWorkflows = true
188188
} else {
189189
// If the queue became versioned just recently, consider the unversioned build id reachable.
190-
queueBecameVersionedAt := util.ReduceSliceInitial(versionSets, hlc.Clock{WallClock: math.MaxInt64}, func(c hlc.Clock, set *persistencespb.CompatibleVersionSet) hlc.Clock {
190+
queueBecameVersionedAt := util.ReduceSlice(versionSets, hlc.Clock{WallClock: math.MaxInt64}, func(c hlc.Clock, set *persistencespb.CompatibleVersionSet) hlc.Clock {
191191
return hlc.Min(c, *set.BecameDefaultTimestamp)
192192
})
193193
reachableByNewWorkflows = time.Since(hlc.UTC(queueBecameVersionedAt)) < wh.config.ReachabilityQuerySetDurationSinceDefault()

0 commit comments

Comments
 (0)