Repository navigation
api: executor version check polls up to the delay; with executor_multi_instance a stopping node keeps the other nodes' executors - #96
Open
EnzinoBB wants to merge 3 commits into
Conversation
…es keep the others' executors - checkExecutorVersion slept executor_check_version_delay (7 s on mainnet, 60 s in CI) on the node's start path and then asked once: it now asks every second (cs::pollUntil) and goes on as soon as the executor answers, with the same outcome as before when it never does (terminated); a transport error means not listening yet and is retried, any other answer is final; a stop is seen within a second. It stays on the launching thread (two threads opening the shared transport would be the new risk). The log line says how long the answer took. - Executor::stop() killed every contract-executor JVM of the machine (jps): with executor_multi_instance it now terminates only its own, as checkAnotherExecutor already does at start. The default keeps the official behaviour. Nothing here touches consensus. Found in the scale runs: every node start waited the full delay, and every restart test relaunched all the executors of the machine. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…'s answer in the version check getExecutorBuildVersion closes the connection on every exception, so 'still connected' never told an answer from a transport failure: it now sets ThriftException for a transport error (as execute() does), the poll retries only that, and the log says whether the executor never answered or answered with an error. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why this PR
checkExecutorVersionsleptexecutor_check_version_delayon the node's start path and asked the executor once, so every start waited the full delay even when the executor was ready earlier.Executor::stop()killed every contract-executor JVM of the machine (jps): withexecutor_multi_instance, stopping one node killed the executors of the other nodes on the same host.What changes
api/src/executor.cpp: the version check asks every second (cs::pollUntil, newlib/include/lib/system/polluntil.hpp) up to the delay and goes on as soon as the executor answers, with the same outcome as before when it never does. A transport error means "not listening yet" and is retried; any other answer is final; a stop is seen within a second. It stays on the launching thread. The log says how long the answer took, and whether the executor never answered or answered with an error.Executor::stop()terminates only its own executor whenexecutor_multi_instanceis set, ascheckAnotherExecutoralready does at start. The default keeps the current behaviour.Effect on the network
None: start-up timing and process management of the executor only.
Tests
tests/csnode/polluntil_tests.cpp(new). Built and run on 4a95aaa (GCC 13).Same change in the community fork: CreditsCommunity#73, running on mainnet community nodes.