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

Backport Heartbeat, MaxRetries and MaxRetryWaitTime #20

Merged
merged 5 commits into from
Jan 20, 2021

Conversation

bmeike
Copy link
Contributor

@bmeike bmeike commented Jan 19, 2021

Backport Heartbeat, MaxRetries and MaxRetryWaitTime, now part of 2.8.4

@bmeike bmeike requested review from pasin and borrrden January 19, 2021 18:48
Copy link
Member

@borrrden borrrden left a comment

Choose a reason for hiding this comment

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

I feel badly for saying "you did too much" but to keep us aligned we should only be putting in heartbeat (and not the other two related to max retry) since .NET and iOS are not scheduled to have it for 2.8.x. The logic can stay, but is there a way to make it not visible externally?

@bmeike
Copy link
Contributor Author

bmeike commented Jan 20, 2021

Oh good grief. Ya, sure. Will fix.

@bmeike bmeike requested a review from borrrden January 20, 2021 01:27
? maxRetries
: ((continuous)
? AbstractCBLWebSocket.DEFAULT_ONE_SHOT_MAX_RETRIES
: AbstractCBLWebSocket.DEFAULT_CONTINUOUS_MAX_RETRIES);
Copy link
Member

Choose a reason for hiding this comment

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

@pasin Should these remain what they are in 2.8.x until 3.0? From what I can tell these are the new defaults.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think the changes will be done in 3.0, otherwise java/android will have different behavior from the other platforms.

Copy link
Contributor Author

@bmeike bmeike Jan 20, 2021

Choose a reason for hiding this comment

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

This function is not visible in 2.8.4 (x == 4, unless I am mistaken). Whether these are the correct values seems a question only for 3.0.0, I think.

Unless you want me to actually remove them.

The amount of time this simple backport has taken is pretty staggering. It could have been a simple cherry-pick. I wish we could find a more efficient way of doing this kind of stuff...

Copy link
Contributor

@pasin pasin Jan 20, 2021

Choose a reason for hiding this comment

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

I might not understand this correctly. It seems like maxRetries is default to -1 so it means that getMaxRetries() will either use DEFAULT_ONE_SHOT_MAX_RETRIES or DEFAULT_CONTINUOUS_MAX_RETRIES?

Update: getMaxRetries() is used internally in effectiveOptions() method.

Copy link
Contributor Author

@bmeike bmeike Jan 20, 2021

Choose a reason for hiding this comment

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

Please tell me what you want, so that I can do it. If I missed something in the spec, my apologies. Just point me at it.

Copy link
Contributor

Choose a reason for hiding this comment

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

DEFAULT_ONE_SHOT_MAX_RETRIES or DEFAULT_CONTINUOUS_MAX_RETRIES are for Lithium. It's OK to keep getMaxRetries() to use in Lithium but can you remove or comment out line 452 and 453 that use the value?

@bmeike bmeike requested a review from borrrden January 20, 2021 18:01
@bmeike
Copy link
Contributor Author

bmeike commented Jan 20, 2021

Removed all traces of maxretries and -interval

Copy link
Contributor

@pasin pasin left a comment

Choose a reason for hiding this comment

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

Have one comment but the rest looks good to me.

@@ -144,7 +140,7 @@ public final ReplicatorConfiguration setChannels(@Nullable List<String> channels
/**
* Sets the the conflict resolver.
*
* @param conflictResolver A conflict resolver.
* @param conflictResolver The replicator type.
Copy link
Contributor

Choose a reason for hiding this comment

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

Wrong description. Can you revert this back to A conflict resolver?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not a regression. That comment has been there for ages. WIll fix in 3.0

@bmeike bmeike merged commit e707a89 into android/release/hydrogen Jan 20, 2021
@bmeike bmeike deleted the candidate/2.8.4 branch January 20, 2021 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants