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

[da-vinci][dvc] Dropping unassigned partitions #1332

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

kristyelee
Copy link
Contributor

Summary, imperative, start upper case, don't end with a period

The objective is to remove unassigned partitions.
Applying this issue to Da Vinci Client which has information over partitions in storage.

This PR is an extension of the PR #1196 [https://github.com//pull/1196] that checks which partitions should be kept [in StorageService] and applies the check in VeniceServer.

Resolves #650

How was this PR tested?

A corresponding test will be written.

Does this PR introduce any user-facing changes?

  • No. You can skip the rest of this section.
  • Yes. Make sure to explain your proposed changes and call out the behavior change.

@kristyelee kristyelee marked this pull request as draft November 20, 2024 23:33
@@ -154,7 +154,13 @@ synchronized CompletableFuture<Void> subscribe(
// Recreate store config that was potentially deleted by unsubscribe.
config.store();
}

ComplementSet<Integer> unassignedPartitionSet = ComplementSet.newSet(subscription);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Upon bootstrapping, it seems that there is a setting to throw a VeniceException when a version is present.
Bootstrapping is invoked in DaVinciBackend.
Additionally, subscription of partitions is invoked in Da Vinci Client where set of partitions can be passed into the subscribe function directly.

Copy link
Contributor

@kvargha kvargha Nov 27, 2024

Choose a reason for hiding this comment

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

What can happen is that when you call unsubscribe subscription can be empty (no partitions passed into subscribe), causing it to delete the current version.

Also, I don't think subscribe is the right place to perform the validation. If a user is subscribing in a for loop, not everything would have been added to subscription yet on the first n-1 invocations. It would be better to do this validation somewhere we can guarantee all subscriptions have been performed. DaVinciBackend::bootstrap might be a good place.

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.

[BUG] Reconcile on disk state with assigned partitions for given resource and delete unused partitions
2 participants