Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(submit): simplified submit loop #1331

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Conversation

mtsitrin
Copy link
Contributor

better role separation between trigger and submitter routines

@mtsitrin mtsitrin marked this pull request as ready for review January 14, 2025 18:21
@mtsitrin mtsitrin requested a review from a team as a code owner January 14, 2025 18:22
@mtsitrin mtsitrin requested review from srene and danwt January 14, 2025 18:22
@@ -55,47 +55,60 @@ func SubmitLoopInner(
maxBatchSubmitBytes uint64, // max size of serialised batch in bytes
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isLastBatchRecent must be removed if not used

Copy link
Contributor

@srene srene left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

im thinking this approach may have a flaw. i think that, if a node is restarted for instance 5 min before the next batch submission by time (e.g. batch time 1 hour), it will wait another hour before trying to submit by time, given the ticker is configured using maxBatchSubmitTime. i think in the current approach the ticker is activated more often, and then its checked whether is necessary to submit by time using isLastBatchRecent func. this way, even if a node is restarted, it will submit every 1 hour.

@mtsitrin mtsitrin self-assigned this Feb 26, 2025
@mtsitrin mtsitrin marked this pull request as draft February 26, 2025 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants