Skip to content

Commit

Permalink
fix bug in TransactionalSpoutBatchExecutor where cleanup could happen…
Browse files Browse the repository at this point in the history
… before the new metadata is saved
  • Loading branch information
Nathan Marz committed Feb 7, 2012
1 parent 943561f commit 16765f6
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ public void execute(Tuple input) {
try {
_emitter.emitBatch(attempt, input.getValue(1), _collector);
_collector.ack(input);
// this is valid here because the batch has been successfully emitted,
// so we can safely delete metadata for prior transactions
_emitter.cleanupBefore((BigInteger) input.getValue(2));
} catch(FailedException e) {
LOG.warn("Failed to emit batch for transaction", e);
_collector.fail(input);
}
// this is valid here because the batch has been successfully emitted,
// so we can safely delete metadata for prior transactions
_emitter.cleanupBefore((BigInteger) input.getValue(2));
}

@Override
Expand Down

0 comments on commit 16765f6

Please sign in to comment.