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

fix: report job count only after it was persisted #593

Merged
merged 3 commits into from
Sep 4, 2024

Conversation

bajtos
Copy link
Member

@bajtos bajtos commented Aug 27, 2024

Fixes filecoin-station/core#583 (hopefully).

This change has a side effect when running a high-job-frequency module like the former Saturn L2 node or Voyager:

  • Before, we would update the state file every time a job was completed.

  • Now, we update the state file at most once per 200ms, as configured via job_report_delay:

    zinnia/daemon/main.rs

    Lines 78 to 82 in 9d882e4

    reporter: Rc::new(StationReporter::new(
    state_file,
    Duration::from_millis(200),
    module_name.into(),
    )),

I am arguing this is a change for the better because there is no point in hammering the file system (and SSD drives) with too frequent updates of the state file.

Signed-off-by: Miroslav Bajtoš <oss@bajtos.net>
@bajtos bajtos requested a review from juliangruber August 27, 2024 12:46
@bajtos
Copy link
Member Author

bajtos commented Sep 2, 2024

@juliangruber ping, do you have any opinion on this change? If not, then I propose to proceed to land & publish it.

@bajtos bajtos enabled auto-merge (squash) September 4, 2024 05:41
@bajtos bajtos merged commit e200609 into main Sep 4, 2024
13 of 14 checks passed
@bajtos bajtos deleted the report-jobcount-after-persited branch September 4, 2024 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error: Negative jobs completed for zinnia
1 participant