Conversation
📊 API Diff Results
|
|
|
||
| currentDonTimes := make(map[string][]int64, len(outcome.ObservedDonTimes)) | ||
| for id, observedDonTimes := range outcome.ObservedDonTimes { | ||
| t.store.setDonTimes(id, observedDonTimes.Timestamps) |
There was a problem hiding this comment.
plugin calls deleteExecutionID here: https://github.com/smartcontractkit/chainlink-common/blob/main/pkg/workflows/dontime/plugin.go#L205
Isn't that enough?
There was a problem hiding this comment.
I had the same though, but Codex says this:
Not by itself.
The deletion in plugin.go only removes state during Outcome, from that node’s local store, at the moment that node computes the pruned outcome. The problem is that transmitter.go also writes to the same local store later, based on whatever is in the transmitted report, and before the fix it only did “upserts”:
•
for IDs still present: setDonTimes(...)
•
for IDs no longer present: do nothing
So if a store already had donTimes["workflow-123"], and a later report arrived where workflow-123 had been pruned from ObservedDonTimes, Transmit would leave that stale entry behind unless that exact process had already deleted it via Outcome.
Why that matters:
•
Outcome cleanup is not the right place to rely on for store reconciliation, because Transmit is another mutation path for the same state.
•
The store should reflect the latest transmitted outcome after Transmit finishes.
•
Without reconciliation in Transmit, stale donTimes can remain locally and RequestDonTime can incorrectly serve old cached timestamps for already-expired execution IDs.
So the deletion in plugin.go was correct, but it was not sufficient to keep the store consistent across all store write paths.
@DylanTinianov : Could you look?
There was a problem hiding this comment.
Yeah this makes sense. Also I have another PR to clean ObservedDonTimes
…common into dontime_pruning
No description provided.