-
Notifications
You must be signed in to change notification settings - Fork 880
fix: trimming timers on workflow close #7566
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
fix: trimming timers on workflow close #7566
Conversation
common/persistence/nosql/nosqlplugin/cassandra/workflow_utils_test.go
Outdated
Show resolved
Hide resolved
common/persistence/nosql/nosqlplugin/cassandra/workflow_utils.go
Outdated
Show resolved
Hide resolved
Signed-off-by: David Porter <[email protected]> Signed-off-by: David Porter <[email protected]>
172b3f6 to
321e944
Compare
Signed-off-by: David Porter <[email protected]>
Code Review Update: Most Issues Resolved ✅I've re-reviewed the PR after applying the fix. Here's the current status: ✅ Resolved Issues:
The critical bugs have been resolved. The PR now properly tracks workflow timer tasks across all execution lifecycle operations (create, update, conflict resolution) and will clean them up when workflows close. |
Fixed Critical Bug: Timer Task Tracking in UpdatesI've fixed the issue where Changes MadeAdded:
Modified
Modified
Improved Documentation:
Impact: This ensures that workflow-level timer tasks created or modified during workflow updates and conflict resolution are properly tracked and will be cleaned up when the workflow closes, not just those created during initial workflow creation. Note: Bug #1 (early return on EntityNotExistsError) appears to have already been fixed in the latest code - it correctly uses |
Signed-off-by: David Porter <[email protected]>
Re-applied Critical Fix: Timer Task Tracking Across All Workflow OperationsI noticed that the previous fix for timer task tracking was not included in the latest squashed commit. I've re-applied it. Issue: The
This meant timer tasks created after initial workflow creation were not tracked and wouldn't be cleaned up. Fix Applied:
Impact: Timer tasks are now properly tracked throughout the entire workflow lifecycle (creation, updates, conflict resolution), ensuring they can be cleaned up when workflows close. |
Code Review Complete ✅I've reviewed the PR after re-applying the timer task tracking fix. The implementation is now in good shape! ✅ All Critical Issues Resolved:
ℹ️ Minor Issue Remaining:
Summary: The core functionality is complete and correct. Timer tasks will now be properly tracked and cleaned up across the entire workflow lifecycle, preventing resource leaks. |
Code Review 👍 Approved with suggestions 4 resolved / 5 findingsThe timer cleanup feature implementation looks good overall. The config 💡 Quality: TaskCleanupTimeoutThreshold config added but never used📄 service/history/config/config.go:297 📄 service/history/config/config.go:571 The // In config/config.go
TaskCleanupTimeoutThreshold dynamicproperties.DurationPropertyFn
...
TaskCleanupTimeoutThreshold: dc.GetDurationProperty(dynamicproperties.TaskCleanupTimeoutThreshold),This creates dead code and may confuse readers about its purpose. Either:
Suggested fix: Either add a comment explaining the planned usage or remove the unused configuration. ✅ 4 resolved✅ Bug: Early return on EntityNotExistsError breaks loop
✅ Bug: syncExecutionInfoWithTasks only called for CreateWorkflowExecution
✅ Quality: Incomplete function doc comment in syncExecutionInfoWithTasks
✅ Edge Case: DeleteTimerTaskRequest missing ShardID field
OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
What changed?
draft fix for #7568
Why?
How did you test it?
Potential risks
Release notes
Documentation Changes