diff options
authorKotresh HR <>2018-05-07 01:23:46 -0400
committerjiffin tony Thottan <>2018-06-11 10:18:03 +0000
commit0d744dbae27a3394bc449bf4489957e6f86f4891 (patch)
parent978e85fcd53895cc4902ea0ab3cfcfacc1077315 (diff)
geo-rep: Fix upgrade issue
Cause and Analysis: The last synced changelog for entry operations is marked in current version to avoid re-processing of already processed entry operations in a batch during crash/restart of geo-rep. This was not present in previous versoins. The marker is maintained in the dictionary with the key 'last_synced_entry' and dictionary is persisted into status file. So upgrading to current version in which the marker is present was failing with KeyError. Solution: Load the dictionary with default keys first which contains all the keys including latest ones and then load the values from status file instead of doing otherwise. Backport of > patch: > Change-Id: Ic654e6f9a3c97f616761f1362f890352a2186fb4 > Signed-off-by: Kotresh HR <> (cherry picked from commit 23c1385b5f6f6103e820d15ecfe1df31940fdb45) fixes: bz#1577862 Change-Id: Ic654e6f9a3c97f616761f1362f890352a2186fb4 Signed-off-by: Kotresh HR <>
1 files changed, 3 insertions, 2 deletions
diff --git a/geo-replication/syncdaemon/ b/geo-replication/syncdaemon/
index 38ca92c..909c669 100644
--- a/geo-replication/syncdaemon/
+++ b/geo-replication/syncdaemon/
@@ -152,11 +152,12 @@ class GeorepStatus(object):
def _update(self, mergerfunc):
+ data = self.default_values
with LockedOpen(self.filename, 'r+') as f:
- data = json.load(f)
+ data.update(json.load(f))
except ValueError:
- data = self.default_values
+ pass
data = mergerfunc(data)
# If Data is not changed by merger func