Skip to content

Commit fe8e72d

Browse files
committed
updates based off review
1 parent 954d5a5 commit fe8e72d

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

db/hybrid_logical_vector.go

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -705,24 +705,25 @@ func IsInConflict(ctx context.Context, localHLV, incomingHLV *HybridLogicalVecto
705705

706706
// check if incoming CV and local CV are the same. This is needed here given that if both CV's are the same the
707707
// below check to check local revision is newer than incoming revision will pass given the check and will add the
708-
// incoming versions even if CV's are the same
708+
// incoming versions even if CVs are the same
709709
if localCV.Equal(*incomingCV) {
710-
base.DebugfCtx(ctx, base.KeyCRUD, "incoming CV %#+v is equal to local revision %#+v", incomingCV, localCV)
710+
base.TracefCtx(ctx, base.KeyVV, "incoming CV %#+v is equal to local revision %#+v", incomingCV, localCV)
711711
return false, ErrNoNewVersionsToAdd
712712
}
713713

714714
// standard no conflict case. In the simple case, this happens when:
715-
// - SG writes document 1@cbs1
716-
// - CBL pulls document 1@cbs1
717-
// - SG writes document 2@cbs1
715+
// - Client A writes document 1@cbs1
716+
// - Client B pulls document 1@cbs1 from Client A
717+
// - Client A writes document 2@cbs1
718+
// - Client B pulls document 2@cbs1 from Client A
718719
if incomingHLV.DominatesSource(*localCV) {
719720
return false, nil
720721
}
721722

722723
// local revision is newer than incoming revision. Common case:
723-
// - CBL writes document 1@cbl1
724-
// - CBL pushes to SG as 1@cbl1
725-
// - CBL pulls document 1@cbl1
724+
// - Client A writes document 1@cbl1
725+
// - Client A pushes to Client B as 1@cbl1
726+
// - Client A pulls document 1@cbl1 from Client B
726727
//
727728
// NOTE: without P2P replication, this should not be the case and we would not get this revision, since CBL
728729
// would respond to a SG changes message that CBL does not need this revision

0 commit comments

Comments
 (0)