Remove ringbuffer dependency from independent periodic tasks - #8445
Open
Eddy Ashton (eddyashton) wants to merge 4 commits into
Open
Eddy Ashton (eddyashton) wants to merge 4 commits into
Eddy Ashton (eddyashton) wants to merge 4 commits into
Conversation
Drive the task clock from a host-side libuv timer while retaining the existing tick semantics and configured interval. Let historical state caches and RPC frontends own their periodic task lifetimes, and remove the unused consensus periodic_end hook. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use the StubLedgerReader introduced by the ledger ringbuffer removal base instead of the removed ringbuffer StubWriter. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Satisfy the clang-tidy named-parameter check for the default no-op RPC handler implementation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Satisfy clang-tidy's member-initialization check in the shared periodic task owner. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.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.
Motivation
Stacked on #8405 as the next step of the ringbuffer-removal plan. Delayed and periodic tasks, historical-state cache maintenance, and frontend endpoint maintenance currently depend on the aggregate
AdminMessage::tickringbuffer message even though they do not need the node/consensus tick's serialization.Consensus, node-to-node channel maintenance, indexing, and the aggregate tick message remain in place for the later ordering-sensitive work.
Implementation summary
tick_interval. Its callback only makes due tasks runnable; task bodies still execute on task workers.PeriodicTaskOwnerfor weak-owner lifetime, cancellation, elapsed-time accounting, and serialization of repeated executions.periodic_end()/tick_end()hook.ccf::tasks::tick()API, recurrence behavior, cancellation behavior, configured period, and deterministic fake-time tests.Safety and compatibility
requests_lock; frontend ticking retains its atomic open check. Periodic callbacks hold owners weakly and are cancelled on destruction.TxHistoryin 2020. History already starts its signature timer only after public recovery; current production endpoint ticks are no-ops.Validation:
task_system_test,historical_queries_test,frontend_test; fully linkedjs_generic; C++/CMake formatting, ASCII, copyright, TODO, and include-policy checks.