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

Candidate/2.8.4 #21

Merged
merged 3 commits into from
Feb 3, 2021
Merged

Candidate/2.8.4 #21

merged 3 commits into from
Feb 3, 2021

Conversation

bmeike
Copy link
Contributor

@bmeike bmeike commented Feb 2, 2021

Add heartbeat tests
CBL-1624: Fix logging bugs
Fix some bugs introduced by the state-machine based implementation of AbstractCBLWebSocket
- AbstractCBLWebSocket is now thread safe
- StateMachine no longer attempts to be thread safe
- AbstractCBLWebSocket now handles close in CONNECTING state
- AbstractCBLWebSocket state machine now correctly handles remote close request.
(Introduce a new state: CLOSE_REQUESTED and handle it properly)

Add heartbeat tests
…ntation

- AbstractCBLWebSocket is now thread safe
- StateMachine no longer attempts to be thread safe
- AbstractCBLWebSocket now handles close in CONNECTING state
- AbstractCBLWebSocket state machine now correctly handles remote close request.
@bmeike bmeike requested review from pasin and borrrden February 2, 2021 20:14
@bmeike bmeike self-assigned this Feb 2, 2021
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.

Look good to me. I have a couple of minor questions that I commented in the change.

socket.getHttpClient().pingIntervalMillis());
}
finally {
repl.stop();
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it OK to not wait until the replicator's stopped before returning?

Copy link
Contributor

Choose a reason for hiding this comment

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

After thought, I guessed it's OK, because the tear down will delete or close database and it will wait for the replicator to stop.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

🤞

@@ -36,7 +36,7 @@ using namespace litecore::jni;
*/
JNIEXPORT void JNICALL Java_com_couchbase_lite_internal_core_C4Base_debug(JNIEnv *env, jclass ignore) {
c4log_enableFatalExceptionBacktrace();
c4log_getWarnOnErrors();
c4log_warnOnErrors(true);
Copy link
Member

Choose a reason for hiding this comment

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

I would caution that this will end up being noisy, and logging exceptions whenever they are thrown, even if they don't cause an actual issue (i.e .they are caught and handled later)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right. Will take it out and put it back in 3.0, protected by the "DEBUGGING" flag.

return n;
}

public static long assertNotNegative(long n, @NonNull String name) {
if (n < 0) { throw new IllegalArgumentException(name + " must be negative"); }
if (n < 0) { throw new IllegalArgumentException(name + " must must not be <0"); }
Copy link
Member

Choose a reason for hiding this comment

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

Double must

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@borrrden borrrden self-requested a review February 2, 2021 23:44
@bmeike bmeike merged commit 16b2d6c into android/release/hydrogen Feb 3, 2021
@bmeike bmeike deleted the candidate/2.8.4 branch February 3, 2021 00:25
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