1
0
Fork 0

Bug fix 3.5/timestamp assert compatibility (#10354)

* assertion on compatibility, when timestamp missing

* assertion on compatibility, when timestamp missing

* assertion on compatibility, when timestamp missing

* assertion on compatibility, when timestamp missing

* Update CHANGELOG
This commit is contained in:
Kaveh Vahedipour 2019-11-05 16:31:29 +01:00 committed by KVS85
parent 461ea7cb5e
commit 6169907f9a
2 changed files with 10 additions and 4 deletions

View File

@ -1,6 +1,8 @@
v3.5.3 (XXXX-XX-XX)
-------------------
* Assertion fail when no timestamp in agency's persistence.
* Fixed internal issue #647: custom analyzer provokes errors on Active Failover
deployment.

View File

@ -335,6 +335,7 @@ void State::logEmplaceBackNoLock(log_t&& l) {
index_t State::logFollower(query_t const& transactions) {
VPackSlice slices = transactions->slice();
size_t nqs = slices.length();
using namespace std::chrono;
while (!_ready && !_agent->isStopping()) {
LOG_TOPIC("8dd4c", DEBUG, Logger::AGENCY) << "Waiting for state to get ready ...";
@ -422,6 +423,9 @@ index_t State::logFollower(query_t const& transactions) {
if (slice.hasKey("timestamp")) { // compatibility with older appendEntries protocol
tstamp = slice.get("timestamp").getUInt();
}
if(tstamp == 0) {
tstamp = duration_cast<milliseconds>(system_clock::now().time_since_epoch()).count();
}
bool reconfiguration = query.keyAt(0).isEqualString(RECONFIGURE);