diff --git a/cluster/sync.go b/cluster/sync.go index 4b39f18..84cfda8 100644 --- a/cluster/sync.go +++ b/cluster/sync.go @@ -417,7 +417,14 @@ func (s *SyncService) resolveConflict(key string, local, remote *types.StoredVal // If we can't find membership info, fall back to UUID comparison for deterministic result if localMember == nil || remoteMember == nil { - s.logger.WithField("key", key).Warn("Could not find membership info for conflict resolution, using UUID comparison") + s.logger.WithFields(logrus.Fields{ + "key": key, + "peerAddress": peerAddress, + "localNodeID": localNodeID, + "localMember": localMember != nil, + "remoteMember": remoteMember != nil, + "totalMembers": len(members), + }).Warn("Could not find membership info for conflict resolution, using UUID comparison") if remote.UUID < local.UUID { // Remote UUID lexically smaller (deterministic choice) err := s.storeReplicatedDataWithMetadata(key, remote) diff --git a/integration_test.sh b/integration_test.sh index 4197cf1..b46b500 100755 --- a/integration_test.sh +++ b/integration_test.sh @@ -230,7 +230,7 @@ test_conflict_resolution() { mkdir -p conflict1_data conflict2_data cd "$SCRIPT_DIR" - if go run test_conflict.go "$TEST_DIR/conflict1_data" "$TEST_DIR/conflict2_data" >/dev/null 2>&1; then + if go run test_conflict.go "$TEST_DIR/conflict1_data" "$TEST_DIR/conflict2_data"; then cd "$TEST_DIR" # Create configs @@ -276,7 +276,7 @@ EOF # Allow time for cluster formation and gossip protocol to stabilize log_info "Waiting for cluster formation and gossip stabilization..." - sleep 10 + sleep 20 # Wait for conflict resolution with retry logic (up to 60 seconds) local max_attempts=20