Fix ObjectOutput.result1 corruption in RMW retries#1836
Conversation
…where retries in Tsavorites InitialUpdater would cause incorrect responses
mgravell
left a comment
There was a problem hiding this comment.
I can't opine on any missing cases, but the ones shown make sense. Kudos for looking wider than the initial report.
|
Genuine question from a mostly-outside-observer who doesn't know anything about the complexity involved: is this amenable to unit testing? Is there some reusable setup/invoke/observe test loop that could be applied to all the operation implementations in a generic way simulating both success and failure (retry), to prevent recurrence/oversight? |
I was thinking on that this morning - it's tricky because the logic is actually split between If we run into more of these (I think I got them all) or similar issues we could harden the code by refactoring to either a) add a |
A number of "object" commands mutate
ObjectOutput.result1in response to aInitialUpdatercall.However these calls can be retried under contention, so any mutation that assumes an initial value (typically 0) will produce incorrect results. I've audited uses of
result1and fixed all the places where this can happen.This fixes #1833
I did a separate pass through
StringOutputandUnifiedOutput, and I think we're all fine there.