- commitFuture = executor.submit(new CommitCoordinationTask(transaction, cohorts,
- commitStatsTracker));
- } catch(RejectedExecutionException e) {
- LOG.error("The commit executor's queue is full - submit task was rejected. \n" +
- executor, e);
- return Futures.immediateFailedCheckedFuture(
- new TransactionCommitFailedException(
- "Could not submit the commit task - the commit queue capacity has been exceeded.", e));
+ // FIXME: use FluentFutures.submit() once it is available
+ future = Futures.submit(new WithTracker(transaction, cohort, commitStatsTracker), executor);
+ } catch (RejectedExecutionException e) {
+ LOG.error("The commit executor's queue is full - submit task was rejected. \n{}", executor, e);
+ return FluentFutures.immediateFailedFluentFuture(new TransactionCommitFailedException(
+ "Could not submit the commit task - the commit queue capacity has been exceeded.", e));