-
|
Looking at the transaction flow from the docs: In Is there a way to distinguish an internal timeout from a genuine My use case: I want to retry immediately on a genuine conflict, but back off on a timeout (since retrying under load makes things worse). Thanks for the great library! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Currently: no. We could potentially track this and add it to the interface, but honestly: a timeout is a timeout - there's a chance it would have been caught by a heartbeat and nuked anyway. An argument could be made that this should surface as a |
Beta Was this translation helpful? Give feedback.
Currently: no. We could potentially track this and add it to the interface, but honestly: a timeout is a timeout - there's a chance it would have been caught by a heartbeat and nuked anyway. An argument could be made that this should surface as a
TimeoutException, but... in most cases, I think "rework the approach" is preferable; this could be via atomic commands at the server (in this case:HSETNXorHSETEX ... {FNX|FXX}, both of which are available viaIDatabaseAsync) or Lua (ScriptEvaluate[Async]).