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

CBL-6592: active pusher should always send proposeChanges regardless … #2199

Merged
merged 2 commits into from
Jan 2, 2025

Conversation

jianminzhao
Copy link
Contributor

…of whether being version-vector or not.

  • There is one test failing, "Push After VV Upgrade", c.f. CBL-6593. It is disabled.

…of whether being version-vector or not.

- There is one test failing, "Push After VV Upgrade", c.f. CBL-6593. It is disabled.
@jianminzhao jianminzhao requested a review from snej December 21, 2024 00:17
@jianminzhao jianminzhao changed the title CBL-6590: active pusher should always send proposeChanges regardless … CBL-6592: active pusher should always send proposeChanges regardless … Dec 21, 2024
@jianminzhao jianminzhao requested a review from pasin December 21, 2024 00:45
@cbl-bot
Copy link

cbl-bot commented Dec 21, 2024

Code Coverage Results:

Type Percentage
branches 66.35
functions 78.57
instantiations 70.73
lines 77.66
regions 73.43

@@ -102,6 +102,7 @@ namespace litecore::repl {
try {
_db.useLocked([&](C4Database* db) {
Assert(db == _checkpointer->collection()->getDatabase());
options.flags |= kC4RevIDGlobalForm;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Instead of changing C4DocEnumerator, you can just call DBAccess::convertVersionToAbsolute on the revID.

@@ -93,7 +93,7 @@ namespace litecore::repl {
if ( !changes && req->body() != "null"_sl ) {
warn("Invalid body of 'changes' message");
req->respondWithError({"BLIP"_sl, 400, "Invalid JSON body"_sl});
} else if ( (!proposed && _mustBeProposed) || (proposed && _db->usingVersionVectors()) ) {
} else if ( !proposed && _mustBeProposed ) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Delete "But with version vectors, always use "changes"." on line 98

@jianminzhao jianminzhao requested a review from snej December 23, 2024 19:58
@jianminzhao jianminzhao merged commit e6ca3aa into master Jan 2, 2025
8 checks passed
jianminzhao added a commit that referenced this pull request Jan 2, 2025
#2199)

* CBL-6590: active pusher should always send proposeChanges regardless of whether being version-vector or not.

- There is one test failing, "Push After VV Upgrade", c.f. CBL-6593. It is disabled.
@jianminzhao jianminzhao deleted the cbl-6590 branch January 2, 2025 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants