Andrew Wong has posted comments on this change. Change subject: disk failure: release failed txs from tracker ......................................................................
Patch Set 6: (1 comment) http://gerrit.cloudera.org:8080/#/c/7439/4//COMMIT_MSG Commit Message: PS4, Line 15: without crashing Kudu, regardless of state. : : T > currently I think we directly enter the 'APPLYING' state when we submit a t Realized I never clicked respond. Right, if the transaction is waiting in the queue, there's not much we can do. When the transaction starts applying, however, we can check if the tablet has been failed and return early. Yeah, a flag to check whether the tablet is on a failed disk (not shut down quite yet) should do the trick (I have essentially that in a separate patch). I think it's fair game to end the transaction mid-apply (e.g. in ApplyRowOperations), lest we fail some checks if the apply is the thing that's failing. I agree that the distinction between "Abort" and "Cancel" is a bit (maybe too) subtle. The necessity comes from the fact that, for write transactions, the TransactionDrivers have ScopedTransaction objects that call MvccManager::AbortTransaction when they're deleted (e.g. when the driver is released). The idea with "Cancel" is that we should be able to safely eject the transaction from the TransactionTracker (deleting the ScopedTransaction, and effectively "completing" the Apply, without ever officially committing the tx, and not have to worry about the constraints of the MvccManager that crash Kudu if aborting during an Apply. Maybe a cleaner API would be to have some TransactionTracker::Abort(TransactionDriver) that would release the driver regardless of state, but that'd be more of a cosmetic change. The underlying behavior would be the same. -- To view, visit http://gerrit.cloudera.org:8080/7439 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I983620f27e7226806a2cca253db7619731914d42 Gerrit-PatchSet: 6 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Andrew Wong <[email protected]> Gerrit-Reviewer: Andrew Wong <[email protected]> Gerrit-Reviewer: David Ribeiro Alves <[email protected]> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Mike Percy <[email protected]> Gerrit-Reviewer: Tidy Bot Gerrit-Reviewer: Todd Lipcon <[email protected]> Gerrit-HasComments: Yes
