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

feat(storage/dataflux): run worksteal listing parallel to sequential listing #10966

Open
wants to merge 32 commits into
base: main
Choose a base branch
from

Conversation

akansha1812
Copy link
Contributor

feat: run worksteal listing parallel to sequential listing
Dataflux fast-listing leverages worksteal algorithm to quickly list objects in a bucket by running several parallel processes. Worksteal algorithm splits a given namespace into multiple ranges for multiple workers(goroutines) to list objects in gcs bucket in parallel.

Adding logic to list next page in worksteal listing and basic unit tests that uses storage/emulator.

Fixes #10731

@akansha1812 akansha1812 requested review from a team as code owners October 8, 2024 19:30
@product-auto-label product-auto-label bot added the api: storage Issues related to the Cloud Storage API. label Oct 8, 2024
storage/dataflux/fast_list.go Show resolved Hide resolved
storage/emulator_test.sh Outdated Show resolved Hide resolved
storage/dataflux/worksteal.go Outdated Show resolved Hide resolved
storage/dataflux/workstea_test.go Outdated Show resolved Hide resolved
storage/dataflux/workstea_test.go Outdated Show resolved Hide resolved
storage/dataflux/sequential_test.go Outdated Show resolved Hide resolved
storage/dataflux/sequential_test.go Outdated Show resolved Hide resolved
storage/dataflux/sequential.go Outdated Show resolved Hide resolved
storage/dataflux/next_page.go Outdated Show resolved Hide resolved
storage/dataflux/next_page.go Show resolved Hide resolved
g.Go(func() error {
objects, err := c.workstealListing(childCtx)
if err != nil {
countError++
Copy link
Contributor

Choose a reason for hiding this comment

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

Won't this be a race condition when c.method is open and both sequential and worksteal are running at the same time? Can we hit this case in a emulator test?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added unit test to catch this in the race conditions.

Copy link
Contributor

@BrennaEpp BrennaEpp left a comment

Choose a reason for hiding this comment

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

Looks like there is a test failing. Can you look into it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the Cloud Storage API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

storage: implement dataflux fast listing
2 participants