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

Only upload a singly synchronous packed slab when buffer is reached #980

Merged
merged 12 commits into from Feb 28, 2024

Conversation

peterjan
Copy link
Member

Not sure how it snuck in but when the buffer max size is reached, we keep uploading packed slabs synchronously until the context eventually times out. That's not what we want, we want to upload a single packed slab synchronously to ensure the buffer goes down, and spin a background thread that eats away at the rest.

@peterjan peterjan self-assigned this Feb 19, 2024
@peterjan peterjan marked this pull request as ready for review February 19, 2024 12:19
worker/upload.go Outdated Show resolved Hide resolved
api/setting.go Show resolved Hide resolved
worker/upload.go Show resolved Hide resolved
worker/upload.go Outdated Show resolved Hide resolved
worker/upload.go Outdated Show resolved Hide resolved
Copy link
Member

@ChrisSchinnerl ChrisSchinnerl left a comment

Choose a reason for hiding this comment

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

Lgtm now but it would be nice to extend the worker tests with a way to test this. e.g. by mocking the bus in a way that allows for manually adding packed slabs and setting the buffer size and then uploading an object to make sure the packed slabs get uploaded too.

@peterjan peterjan changed the base branch from dev to pj/mock-bus February 27, 2024 11:23
worker/upload_test.go Outdated Show resolved Hide resolved
worker/worker_test.go Outdated Show resolved Hide resolved
Base automatically changed from pj/mock-bus to dev February 28, 2024 12:14
@ChrisSchinnerl ChrisSchinnerl merged commit 1ef39bc into dev Feb 28, 2024
6 checks passed
@ChrisSchinnerl ChrisSchinnerl deleted the pj/fix-packed-slab-uploads branch February 28, 2024 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Released
Development

Successfully merging this pull request may close these issues.

None yet

3 participants