WIP: time skipping turns to versioned transition for task validation#10894
WIP: time skipping turns to versioned transition for task validation#10894feiyang3cat wants to merge 9 commits into
Conversation
3a69d46 to
3e6e359
Compare
|
|
||
| // This is the NamespaceFailoverVersion at which this fast-forward was configured. | ||
| // It is used to validate the time skipping fast-forward timer task. | ||
| int64 version = 5; |
There was a problem hiding this comment.
I don't have super strong opinion but ideally I think we should use the (LastUpdate)VersionedTransition concept/primitive here (which is invented for this validation purpose) and be consistent with how we are tracking "component" updates and validating component tasks in the state-based replication & CHASM world.
I understand all existing workflow transfer/timer tasks are using their own version field, but that's something we are gradually moving away from as we migrate more and more components onto CHASM. and hopefully one day we can have only one approach for tracking and invalidating tasks.
cc @xwduan
b6dd7fa to
54ac021
Compare
54ac021 to
b836ae2
Compare
b836ae2 to
b8c8262
Compare
| } | ||
|
|
||
| // always install a fresh fast-forward bound | ||
| currentVersionedTransition := ms.CurrentVersionedTransition() |
There was a problem hiding this comment.
need to confirm my understanding :
there won't be a case where there is time skipping feature in the system while versioned transitioned returned nil (= transition history is not enabled
466df66 to
49282c0
Compare
| TaskTypeTagProvider func(t tasks.Task, isActive bool, chasmRegistry *chasm.Registry) string | ||
| ) | ||
|
|
||
| // terminalTaskError indicates a task hit an unexpected, unrecoverable invariant violation in its |
There was a problem hiding this comment.
I think it is better we have a unified way/generic way to check unexpected invariants failures in tasks, they shouldn't be retried, but need logs/metrics and optionally need dlq (and I didn't add dlq needed flag as right now dlq is treated not as a per-task choice by design and I don't want to couple this pr with this change).
adding a generic implementation of this MaybeTerminalTaskError maybe a choice, but
need a closer look at this design if this is the best one
49282c0 to
3ffb298
Compare
3ffb298 to
18ea071
Compare
61c15c4 to
7ef3753
Compare
What changed?
Why?
How did you test it?