-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
storage: untangle aborting transactions from cancelling batches #3037
Comments
from the discussion there:
|
(I was curious if we can fix #3037 (and #1989). The change introduces some complexity and I'm not totally sure we should fix these issues.) This commit changes EndTransaction to return nil error on txn abort so that the we can commit a batch and update the transaction record. Change txnSender.Send so that it convert a nil error to TransactionAbortedError so that txn.Exec will initiate a restart. This change is hacky, but I couldn't come up with a better approach. We still return TransactionAbortedError in other places and keep the code path for handling TransactionAbortedError.
Did #5885 really resolve this? On Thu, Apr 7, 2016 at 11:26 AM, Kenji Kaneda notifications@github.com
|
As of recently, we already special-case |
ah, sorry.. wasn't intentional. |
Currently, whenever an error is returned from EndTransaction, the "batch" (
engine.Engine
) is never committed. In particular, any local intent resolution is discarded. This is problematic in the case of wanting to abort a transaction and resolve its intents because the abortion is signalled withTransactionAbortedError
, which is an error, as its name suggests, and prevents the local intent resolution from being committed.We either need to signal transaction abortion separately from errors, or else introduce special casing for certain errors so that they do not prevent
engine.Engine
"batches" from committing.This came up in #3028.
The text was updated successfully, but these errors were encountered: