Skip to content

Commit e73b6f9

Browse files
committed
alter comments + remove debugging lines
1 parent 93d0b90 commit e73b6f9

File tree

3 files changed

+3
-16
lines changed

3 files changed

+3
-16
lines changed

rest/utilities_testing_blip_client.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,9 +349,7 @@ func (btcc *BlipTesterCollectionClient) _resolveConflict(incomingHLV *db.HybridL
349349
}
350350

351351
func (btcc *BlipTesterCollectionClient) _resolveConflictLWW(incomingHLV *db.HybridLogicalVector, incomingBody []byte, incomingIsDelete bool, latestLocalRev *clientDocRev) (body []byte, hlv db.HybridLogicalVector, isTombstone bool) {
352-
fmt.Println("incoming hlv in resolver", incomingHLV)
353352
latestLocalHLV := latestLocalRev.HLV
354-
fmt.Println("local hlv in resolver", latestLocalHLV)
355353
updatedHLV := latestLocalRev.HLV.Copy()
356354
localDeleted := latestLocalRev.isDelete
357355
if localDeleted && !incomingIsDelete {

topologytest/multi_actor_no_conflict_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,9 @@ func TestMultiActorResurrect(t *testing.T) {
107107

108108
resBody := fmt.Appendf(nil, `{"activePeer": "%s", "createPeer": "%s", "deletePeer": "%s", "resurrectPeer": "%s", "topology": "%s", "action": "resurrect"}`, resurrectPeerName, createPeerName, deletePeer, resurrectPeer, topology.specDescription)
109109
resurrectVersion := resurrectPeer.WriteDocument(collectionName, docID, resBody)
110-
// in the case of a Couchbase Server resurrection, the hlv is lost since all system xattrs are lost on a resurrection
111-
// if cbs resurrect, if delete AND resurrecting peer is server side peer (cbs or sgw) the all docs will converge for version expected
112-
// if cbs resurrect and delete AND resurrecting peer is NOT server side peer (lite), then need to wait for tombstone convergence first
110+
// in the case of a Couchbase Server resurrection, the hlv is lost since all system xattrs are
111+
// lost on a resurrection so the resurrecting version may conflict with a version on cbl
112+
// peer then cbl will resolve in favour if its own tombstone.
113113
if resurrectPeer.Type() == PeerTypeCouchbaseServer {
114114
if strings.Contains(topologySpec.description, "CBL") {
115115
if conflictNotExpectedOnCBL(deletePeer, resurrectPeer, deletePeerName, resurrectPeerName) {

topologytest/peer_test.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,6 @@ func (p Peers) SortedPeers() iter.Seq2[string, Peer] {
127127
}
128128
}
129129

130-
func (p Peers) PeerList() []string {
131-
peerNames := slices.Collect(maps.Keys(p))
132-
return peerNames
133-
}
134-
135130
// peerIsServerSide returns true if the peer is a Couchbase Server or Sync Gateway peer.
136131
func peerIsServerSide(p Peer) bool {
137132
if p.Type() == PeerTypeCouchbaseServer || p.Type() == PeerTypeSyncGateway {
@@ -149,12 +144,10 @@ func conflictNotExpectedOnCBL(deletePeer Peer, resurrectPeer Peer, delPeerName s
149144
}
150145
if peerIsServerSide(deletePeer) && peerIsServerSide(resurrectPeer) {
151146
if strings.Contains(delPeerName, "1") && strings.Contains(resPeerName, "2") {
152-
fmt.Println("conflict expected due to different backing bucket")
153147
// conflict expected due to different backing bucket (sourceID)
154148
return false
155149
}
156150
if strings.Contains(delPeerName, "2") && strings.Contains(resPeerName, "1") {
157-
fmt.Println("conflict expected due to different backing bucket")
158151
// conflict expected due to different backing bucket (sourceID)
159152
return false
160153
}
@@ -283,10 +276,6 @@ func (to Topology) SortedPeers() iter.Seq2[string, Peer] {
283276
return to.peers.SortedPeers()
284277
}
285278

286-
func (to Topology) PeersInTopology() []string {
287-
return to.peers.PeerList()
288-
}
289-
290279
// CompareRevTreeOnly is true for a given topology when comparing only revtree is correct.
291280
func (to Topology) CompareRevTreeOnly() bool {
292281
for _, peer := range to.peers.ActivePeers() {

0 commit comments

Comments
 (0)