Skip to content

feat(propdefs-v2): inline batch writes when any batch bucket is full #30959

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

Merged
merged 1 commit into from
Apr 9, 2025

Conversation

eli-r-ph
Copy link
Contributor

@eli-r-ph eli-r-ph commented Apr 8, 2025

Problem

Seeing some problems with v2 batch writes in prod-us at high event volume, even using larger batches, with the internal queue backing up. I think this is a result of passing along all the batches to tokio::spawn before awaiting any handles to complete.

Changes

  • Inline writes of any full batches in the batching loop

Just to see how it behaves in next deploy test. Next thing to try: inline all (most?) batch writes in the main thread.

Does this work well for both Cloud and self-hosted?

Yes

How did you test this code?

Locally and in CI; once merged, in deploy test and observation

@eli-r-ph eli-r-ph requested a review from a team April 8, 2025 19:36
@eli-r-ph eli-r-ph self-assigned this Apr 8, 2025
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This PR updates the v2 batch ingestion logic to perform inline flushes of full batch buckets during the update loop, aiming to reduce internal queue buildup under high load.

  • Inline full batch writes immediately in rust/property-defs-rs/src/v2_batch_ingestion.rs instead of deferring with tokio::spawn.
  • Maintains existing retry and error handling logic for failed updates.
  • Notes potential throughput impact if the main thread pauses due to DB latency.

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

@eli-r-ph eli-r-ph merged commit e14204d into master Apr 9, 2025
83 of 84 checks passed
@eli-r-ph eli-r-ph deleted the eli.r/inline-v2-batch-writes-propdefs branch April 9, 2025 16:53
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.

2 participants