mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-08-24 19:46:30 +00:00
Fix reconciliation logic
This commit is contained in:
@@ -104,6 +104,11 @@ impl Entry<EmptyKey, String> for Key {
|
||||
}
|
||||
|
||||
fn merge(&mut self, other: &Self) {
|
||||
if other.name_timestamp > self.name_timestamp {
|
||||
self.name_timestamp = other.name_timestamp;
|
||||
self.name = other.name.clone();
|
||||
}
|
||||
|
||||
if other.deleted {
|
||||
self.deleted = true;
|
||||
}
|
||||
@@ -111,10 +116,6 @@ impl Entry<EmptyKey, String> for Key {
|
||||
self.authorized_buckets.clear();
|
||||
return;
|
||||
}
|
||||
if other.name_timestamp > self.name_timestamp {
|
||||
self.name_timestamp = other.name_timestamp;
|
||||
self.name = other.name.clone();
|
||||
}
|
||||
|
||||
for ab in other.authorized_buckets.iter() {
|
||||
match self
|
||||
|
||||
Reference in New Issue
Block a user