influxdata / influxdata/kapacitor
disabling task doesn't reset state_duration
- Dominant language
- Go
- Stars
- 2.4k
- Forks
- 479
- Avg merge
- 4d 16h
- Merged PRs (30d)
- 4
Description
state_duration doesn't reset to -1, when task is disabled.
so the state doesn't `flip` even task is disabled then enabled
https://github.com/influxdata/kapacitor/blob/e58f95a4466663d64b623b668bd1185847d99c7a/state_tracking.go#L117.
does there have any way to reset all node state back to initial state ?
otherwise have to workaround with delete task and add task again.
Contributor guide
Research direction
Start with state_tracking.go at the linked line and trace how state_duration is handled when a task is disabled and enabled again. Reproduce the disable/enable sequence and verify that the node state returns to its initial state and can flip again; identify any existing state-related tests before making the change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend, observability
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100