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

Special oplog implementation for ephemeral workers #972

Merged
merged 4 commits into from
Sep 25, 2024

Conversation

vigoo
Copy link
Contributor

@vigoo vigoo commented Sep 25, 2024

Resolves #935

Introduces a new oplog implementation for ephemeral workers, with the following properties:

  • It directly writes to the last oplog archive (targeting the blob store with the default config)
  • It has a separate "max entries before commit" configuration, which is bigger by default than the original one
  • In many cases where there is a forced commit for durable workers (for example after remote writes), it does not commit
  • Even if it commits, it does that in the background, except in some "forced commit" situations.

/// Always commit, both for durable and ephemeral workers, no guarantees that it awaits it
Always,
/// Only commit immediately if the worker is durable
DurableOnly,
Copy link
Contributor

Choose a reason for hiding this comment

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

is this also async / no guartantees? just thinking about the naming

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For durable workers all commits are as before - they are "async blocking" until the entries are written.
For ephemeral workers, the three levels are:

  • like the above
  • commit, but on a spawned background fiber
  • ignore

tried to bring in names that makes sense, maybe failed :)

@vigoo vigoo enabled auto-merge (squash) September 25, 2024 16:28
@vigoo vigoo merged commit 36c92d2 into main Sep 25, 2024
14 checks passed
@vigoo vigoo deleted the vigoo/optimized-ephemeral-oplog-writes branch September 25, 2024 16:47
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.

Optimize ephemeral worker oplog writes
3 participants