+ private void commitTimeoutCheck() {
+ store.checkForExpiredTransactions(transactionCommitTimeout, this::updateAccess);
+ commitCoordinator.checkForExpiredTransactions(transactionCommitTimeout, this);
+ }
+
+ private Optional<Long> updateAccess(final SimpleShardDataTreeCohort cohort) {
+ final FrontendIdentifier frontend = cohort.getIdentifier().getHistoryId().getClientId().getFrontendId();
+ // If this frontend has freshly connected, give it some time to catch up before killing its transactions.
+ final LeaderFrontendState state = knownFrontends.get(frontend);
+ return state == null ? Optional.absent() : Optional.of(state.getLastConnectTicks());
+ }
+