You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by xu...@apache.org on 2026/10/26 19:03:54 UTC

(opendal-yinyang) branch xuanwo/managed-sync-reconciliation updated: fix: classify a conflict side by presence, not by backup capture

This is an automated email from the ASF dual-hosted git repository.

Xuanwo pushed a commit to branch xuanwo/managed-sync-reconciliation
in repository https://gitbox.apache.org/repos/asf/opendal-yinyang.git


The following commit(s) were added to refs/heads/xuanwo/managed-sync-reconciliation by this push:
     new b3ac766  fix: classify a conflict side by presence, not by backup capture
b3ac766 is described below

commit b3ac766aeb9abb8b0c37e12f35c93f84617a35bb
Author: Xuanwo <gi...@xuanwo.io>
AuthorDate: Tue Oct 27 03:03:47 2026 +0800

    fix: classify a conflict side by presence, not by backup capture
    
    A preserved local backup stays available as local_artifact, but an ordinary
    content divergence remains current-file on both sides. Retained-artifact is
    reserved for a version that exists only in retained state.
    
    Co-authored-by: Chojan Shang <ps...@apache.org>
---
 src/replica/directory.rs | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/replica/directory.rs b/src/replica/directory.rs
index 4614450..536e619 100644
--- a/src/replica/directory.rs
+++ b/src/replica/directory.rs
@@ -2062,11 +2062,10 @@ impl<'a> Context<'a> {
             .filter(|node| matches!(node.kind, LocalKind::File { .. }))
             .and_then(|node| self.replica.capture_file(path, node).ok());
         let remote_node = self.remote.get(path).map(Node::id);
-        let local = if captured.is_some() {
-            "retained_artifact"
-        } else {
-            self.local_side(path)
-        };
+        // The observable local side is classified by presence. A preserved
+        // backup is reported separately as `local_artifact` and does not turn
+        // an ordinary content divergence into a retained-artifact side.
+        let local = self.local_side(path);
         let remote = self.remote_side(path);
         record_conflict(
             self.outcome,