1
0
Fork 0

improve compatibility when replicating from a 3.2 (#3865)

This commit is contained in:
Jan 2017-12-08 15:52:31 +01:00 committed by GitHub
parent 613cc4f749
commit be019ffaad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 4 deletions

View File

@ -1283,11 +1283,12 @@ Result TailingSyncer::fetchOpenTransactions(TRI_voc_tick_t fromTick,
TRI_voc_tick_t readTick = StringUtils::uint64(header);
if (!fromIncluded && _requireFromPresent && fromTick > 0) {
if (!fromIncluded && _requireFromPresent && fromTick > 0 &&
(!simulate32Client() || fromTick != readTick)) {
return Result(TRI_ERROR_REPLICATION_START_TICK_NOT_PRESENT, std::string("required init tick value '") +
StringUtils::itoa(fromTick) + "' is not present (anymore?) on master at " +
_masterInfo._endpoint + ". Last tick available on master is '" + StringUtils::itoa(readTick) +
"'. It may be required to do a full resync and increase the number of historic logfiles on the master.");
"'. It may be required to do a full resync and increase the number of historic logfiles/WAL file timeout on the master.");
}
startTick = readTick;
@ -1337,6 +1338,7 @@ Result TailingSyncer::followMasterLog(TRI_voc_tick_t& fetchTick,
StringUtils::itoa(_configuration._chunkSize) + "&barrier=" +
StringUtils::itoa(_barrierId);
TRI_voc_tick_t const originalFetchTick = fetchTick;
worked = false;
std::string const url = baseUrl + "&from=" + StringUtils::itoa(fetchTick) +
@ -1442,12 +1444,13 @@ Result TailingSyncer::followMasterLog(TRI_voc_tick_t& fetchTick,
_applier->_state._lastAvailableContinuousTick = tick;
}
if (!fromIncluded && _requireFromPresent && fetchTick > 0) {
if (!fromIncluded && _requireFromPresent && fetchTick > 0 &&
(!simulate32Client() || originalFetchTick != tick)) {
return Result(TRI_ERROR_REPLICATION_START_TICK_NOT_PRESENT, std::string("required follow tick value '") +
StringUtils::itoa(fetchTick) + "' is not present (anymore?) on master at " + _masterInfo._endpoint +
". Last tick available on master is '" + StringUtils::itoa(tick) +
"'. It may be required to do a full resync and increase the number " +
"of historic logfiles on the master");
"of historic logfiles/WAL file timeout on the master");
}
TRI_voc_tick_t lastAppliedTick;