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

Unsubscribe on partition reassignment #1021

Merged
merged 5 commits into from
May 16, 2024
Merged

Unsubscribe on partition reassignment #1021

merged 5 commits into from
May 16, 2024

Conversation

akrambek
Copy link
Contributor

Description

Unsubscribe on partition reassignment

Fixes #882

@akrambek akrambek marked this pull request as ready for review May 14, 2024 19:48
@@ -533,7 +536,8 @@ final class KafkaCacheServerConsumerFanout
private final long routedId;
private final long authorization;
private final ArrayList<KafkaCacheServerConsumerStream> streams;
private final Object2ObjectHashMap<String, String> members;
private final Map<String, String> members;
private final ObjectHashSet<String> tempMembers;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
private final ObjectHashSet<String> tempMembers;
private final ObjectHashSet<String> memberIds;

@@ -578,7 +582,8 @@ private KafkaCacheServerConsumerFanout(
this.groupId = groupId;
this.timeout = timeout;
this.streams = new ArrayList<>();
this.members = new Object2ObjectHashMap<>();
this.tempMembers = new ObjectHashSet<>();
this.members = new LinkedHashMap<>();
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we switching to LinkedHashMap to maintain insertion order, or for putIfAbsent?
Note: putIfAbsent is also available on Object2ObjectHashMap, inherited from Map.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

to maintain insertion order

Comment on lines 943 to 946
KafkaDataExFW extension)
Flyweight extension)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this change necessary?

@jfallows jfallows merged commit 8b514bd into aklivity:develop May 16, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants