Skip to content

perf: parallelize S3 segment and index uploads#110

Merged
novatechflow merged 2 commits intoKafScale:mainfrom
klaudworks:parallelize-s3-uploads
Feb 25, 2026
Merged

perf: parallelize S3 segment and index uploads#110
novatechflow merged 2 commits intoKafScale:mainfrom
klaudworks:parallelize-s3-uploads

Conversation

@klaudworks
Copy link
Contributor

@klaudworks klaudworks commented Feb 24, 2026

See #109

Summary

  • Upload .kfs and .index files concurrently in flushLocked() using errgroup, eliminating one sequential S3 round-trip from the produce path.

Details

The two S3 uploads are independent — neither depends on the other's result. errgroup.WithContext is used so that if one upload fails, the other's context is cancelled promptly. The onS3Op callback still reports individual per-upload timings.

Upload .kfs and .index files concurrently using errgroup to eliminate
one sequential S3 round-trip from the produce path. Side effects
(cache population, segment list update) are deferred until both
uploads succeed.

Closes KafScale#109
@novatechflow
Copy link
Collaborator

@novatechflow
Copy link
Collaborator

it’s in the test callback: (uploads++) is being unsynchronized under new parallel upload callbacks.

@klaudworks
Copy link
Contributor Author

@novatechflow thanks for pointing that out!

Copy link
Collaborator

@novatechflow novatechflow left a comment

Choose a reason for hiding this comment

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

thank you @klaudworks!

@novatechflow novatechflow merged commit 1bf442e into KafScale:main Feb 25, 2026
4 checks passed
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