/** * Mark the specified completed procedure, as ready to remove. * @param procId the ID of the procedure to remove */ public void removeResult(long procId) { CompletedProcedureRetainer<TEnvironment> retainer = completed.get(procId); if (retainer == null) { assert !procedures.containsKey(procId) : "pid=" + procId + " is still running"; LOG.debug("pid={} already removed by the cleaner.", procId); return; } // The CompletedProcedureCleaner will take care of deletion, once the TTL is expired. retainer.setClientAckTime(EnvironmentEdgeManager.currentTime()); }
private void procedureFinished(Procedure<TEnvironment> proc) { // call the procedure completion cleanup handler execCompletionCleanup(proc); CompletedProcedureRetainer<TEnvironment> retainer = new CompletedProcedureRetainer<>(proc); // update the executor internal state maps if (!proc.shouldWaitClientAck(getEnvironment())) { retainer.setClientAckTime(0); } completed.put(proc.getProcId(), retainer); rollbackStack.remove(proc.getProcId()); procedures.remove(proc.getProcId()); // call the runnableSet completion cleanup handler try { scheduler.completionCleanup(proc); } catch (Throwable e) { // Catch NullPointerExceptions or similar errors... LOG.error("CODE-BUG: uncatched runtime exception for completion cleanup: {}", proc, e); } // Notify the listeners sendProcedureFinishedNotification(proc.getProcId()); }
/** * Mark the specified completed procedure, as ready to remove. * @param procId the ID of the procedure to remove */ public void removeResult(long procId) { CompletedProcedureRetainer<TEnvironment> retainer = completed.get(procId); if (retainer == null) { assert !procedures.containsKey(procId) : "pid=" + procId + " is still running"; LOG.debug("pid={} already removed by the cleaner.", procId); return; } // The CompletedProcedureCleaner will take care of deletion, once the TTL is expired. retainer.setClientAckTime(EnvironmentEdgeManager.currentTime()); }
private void procedureFinished(Procedure<TEnvironment> proc) { // call the procedure completion cleanup handler execCompletionCleanup(proc); CompletedProcedureRetainer<TEnvironment> retainer = new CompletedProcedureRetainer<>(proc); // update the executor internal state maps if (!proc.shouldWaitClientAck(getEnvironment())) { retainer.setClientAckTime(0); } completed.put(proc.getProcId(), retainer); rollbackStack.remove(proc.getProcId()); procedures.remove(proc.getProcId()); // call the runnableSet completion cleanup handler try { scheduler.completionCleanup(proc); } catch (Throwable e) { // Catch NullPointerExceptions or similar errors... LOG.error("CODE-BUG: uncatched runtime exception for completion cleanup: {}", proc, e); } // Notify the listeners sendProcedureFinishedNotification(proc.getProcId()); }