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 20 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ public DaVinciBackend(
String pid = Utils.getPid();
String instanceSuffix =
configLoader.getCombinedProperties().getString(PUSH_STATUS_INSTANCE_NAME_SUFFIX, (pid == null ? "NA" : pid));
// Current instance name.
String instanceName = Utils.getHostName() + "_" + instanceSuffix;

// Fetch latest update schema's protocol ID for Push Status Store from Router.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
kvargha marked this conversation as resolved.
Show resolved Hide resolved
// Set of partitions that are not included in the submitted set of partitions.
unassignedPartitionSet.removeAll(partitions);

subscription.addAll(partitions);
unsubscribe(unassignedPartitionSet);

if (daVinciFutureVersion == null) {
trySubscribeDaVinciFutureVersion();
Expand Down
Loading