-
Notifications
You must be signed in to change notification settings - Fork 709
Ct/core 15022/sharded gc workers #29088
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
Draft
oleiman
wants to merge
12
commits into
redpanda-data:dev
Choose a base branch
from
oleiman:ct/core-15022/sharded-gc-workers
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Ct/core 15022/sharded gc workers #29088
oleiman
wants to merge
12
commits into
redpanda-data:dev
from
oleiman:ct/core-15022/sharded-gc-workers
+1,060
−56
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
72eaa03 to
0e7696d
Compare
0e7696d to
ef51053
Compare
Signed-off-by: Oren Leiman <[email protected]>
By default cloud_io::remote::list_objects is greedy. In this case, we want to control paging in the garbage collector. Signed-off-by: Oren Leiman <[email protected]>
The control loop doesn't need to know about the rest of the list_objects response on the happy path, except if an error occurred. This will make it easier to change the source of those bucket items when/if we add some caching. Signed-off-by: Oren Leiman <[email protected]>
Signed-off-by: Oren Leiman <[email protected]>
Includes plumbing self node ID & members_table down into level_zero_gc Signed-off-by: Oren Leiman <[email protected]>
97ec718 to
6bf7fcd
Compare
Gives the range of random prefixes assigned to this node by dividing prefix space up according to the total number of shards in the cluster and assigning a range to each shard based on index from lowest node ID value. Signed-off-by: Oren Leiman <[email protected]>
- list_objects - filter on assigned prefix range - report back to caller whether we've gone past our assigned max prefix The general idea here is to hide the details of prefix filtering from the control loop. This is where, ultimately, we'll want to wire in some kind of local cache for known outstanding garbage. Signed-off-by: Oren Leiman <[email protected]>
Signed-off-by: Oren Leiman <[email protected]>
In a loop:
- try to get the next page
- if an error occurs, bail
- if the result is non-empty, return the objects
- otherwise do_next_page reports whether or not we have passed the
maximum assigned prefix for this shard
- if so, stop iterating, there are definitely no more objects we care about
in the bucket
- if not, we have _not yet_ reached the minimum assigned prefix, so we
should keep paging through the bucket
This is not very efficient if the number of objects in the bucket grows very
large. Alternatives include:
- caching bucket contents
- listing on assigned prefixes only
Signed-off-by: Oren Leiman <[email protected]>
Needs cleanup, but basically simulates multi-shard prefix space partitioning. Signed-off-by: Oren Leiman <[email protected]>
6bf7fcd to
07d7742
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
builds on
Backports Required
Release Notes