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

Feature/no connection serial recovery key #980

Merged

Conversation

sacOO7
Copy link
Collaborator

@sacOO7 sacOO7 commented Nov 27, 2023

Related #974
Related #846
Related #976

@github-actions github-actions bot temporarily deployed to staging/pull/980/features November 27, 2023 12:07 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/980/javadoc November 27, 2023 12:07 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/980/features November 28, 2023 12:53 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/980/javadoc November 28, 2023 12:54 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/980/features November 28, 2023 13:00 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/980/javadoc November 28, 2023 13:01 Inactive
@sacOO7 sacOO7 force-pushed the feature/no-connection-serial-recovery-key branch from 229617e to 1509938 Compare November 28, 2023 13:01
@github-actions github-actions bot temporarily deployed to staging/pull/980/features November 28, 2023 13:01 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/980/javadoc November 28, 2023 13:02 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/980/features November 28, 2023 16:48 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/980/javadoc November 28, 2023 16:48 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/980/features November 28, 2023 17:04 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/980/javadoc November 28, 2023 17:04 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/980/features November 28, 2023 17:29 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/980/javadoc November 28, 2023 17:29 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/980/javadoc November 29, 2023 12:26 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/980/features November 29, 2023 12:45 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/980/javadoc November 29, 2023 12:45 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/980/features November 29, 2023 13:01 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/980/javadoc November 29, 2023 13:01 Inactive
@sacOO7 sacOO7 requested a review from owenpearson November 29, 2023 13:02
@sacOO7 sacOO7 force-pushed the feature/no-connection-serial branch from 6461967 to 72992c9 Compare November 29, 2023 17:14
@sacOO7 sacOO7 requested review from ttypic and lmars November 29, 2023 17:19
@sacOO7 sacOO7 marked this pull request as ready for review November 29, 2023 17:20
@github-actions github-actions bot temporarily deployed to staging/pull/980/features November 30, 2023 12:26 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/980/javadoc November 30, 2023 12:27 Inactive
lib/src/main/java/io/ably/lib/realtime/AblyRealtime.java Outdated Show resolved Hide resolved
public RecoveryKeyContext(String connectionKey, long msgSerial, Map<String, String> channelSerials) {
this.connectionKey = connectionKey;
this.msgSerial = msgSerial;
this.channelSerials.putAll(channelSerials);
Copy link
Contributor

Choose a reason for hiding this comment

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

Out of curiosity, why do we copy channelSerials?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

General principal of immutability. We have marked channelSerials field as immutable, so it shouldn't get influenced by
changes in external channelserials and should only capture snapshot of serials at the time of creating the instance.

Copy link
Contributor

Choose a reason for hiding this comment

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

Got you! (one more point to rewrite lib in Kotlin) I personally prefer using analog of guava's ImmutableMap which just wraps around existing Map rather than make Map's copy. But it this particular code probably no harm to copy

@github-actions github-actions bot temporarily deployed to staging/pull/980/features December 1, 2023 11:10 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/980/javadoc December 1, 2023 11:11 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/980/features December 1, 2023 11:15 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/980/javadoc December 1, 2023 11:15 Inactive
@sacOO7 sacOO7 merged commit 47862f4 into feature/no-connection-serial Dec 1, 2023
4 of 9 checks passed
@sacOO7 sacOO7 deleted the feature/no-connection-serial-recovery-key branch December 1, 2023 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants