Use sync after reconnect to avoid stale reads

This commit is contained in:
Antonio Andelic 2022-06-20 14:05:51 +00:00
parent 6c225bb04d
commit df31b562ec

View File

@ -233,9 +233,8 @@ void TransactionLog::runUpdatingThread()
}
/// It's possible that we connected to different [Zoo]Keeper instance
/// so we may read a bit stale state. Run some writing request before loading log entries
/// to make that instance up-to-date.
zookeeper->set(zookeeper_path_log, "");
/// so we may read a bit stale state.
zookeeper->sync(zookeeper_path_log);
}
loadNewEntries();