Closed guelfey closed 2 years ago
I see it as a bug fix actually - this was supposed to already happen
I see it as a bug fix actually - this was supposed to already happen
The transaction ID handling seems new to me. But we can also roll it out slowly and see 👍🏻
This was previously attempted with the flushAll call, but this doesn't seem to be reliable in practice - since it sets the read timeout to time.Now(), this means that in practice the Read in most cases actually returns directly without attempting to read.
Instead of trying to extend the deadline for the flushing read by some arbitrary small value, this fix handles the problem at a different place: if we detect a transaction ID mismatch by 1, we simply ignore the response and assume that a matching response will follow. This required some refactoring of the reading code since just retrying the read without another write wasn't easily possible.