- private void failTransaction(final RequestEnvelope envelope, final long now, final RuntimeRequestException cause) {
+ void successfulPreCommit(final RequestEnvelope envelope, final long startTime) {
+ if (state instanceof Retired) {
+ LOG.debug("{}: Suppressing successful preCommit of retired transaction {}", persistenceId(),
+ getIdentifier());
+ return;
+ }
+
+ final Ready ready = checkReady();
+ LOG.debug("{}: Transaction {} completed preCommit", persistenceId(), getIdentifier());
+ recordAndSendSuccess(envelope, startTime, new TransactionPreCommitSuccess(getIdentifier(),
+ envelope.getMessage().getSequence()));
+ ready.stage = CommitStage.PRE_COMMIT_COMPLETE;
+ }
+
+ void failTransaction(final RequestEnvelope envelope, final long now, final RuntimeRequestException cause) {
+ if (state instanceof Retired) {
+ LOG.debug("{}: Suppressing failure of retired transaction {}", persistenceId(), getIdentifier(), cause);
+ return;
+ }
+