mirror of https://gitee.com/bigwinds/arangodb
improve compatibility when replicating from a 3.2 (#3865)
This commit is contained in:
parent
613cc4f749
commit
be019ffaad
|
@ -1283,11 +1283,12 @@ Result TailingSyncer::fetchOpenTransactions(TRI_voc_tick_t fromTick,
|
||||||
|
|
||||||
TRI_voc_tick_t readTick = StringUtils::uint64(header);
|
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 '") +
|
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 " +
|
StringUtils::itoa(fromTick) + "' is not present (anymore?) on master at " +
|
||||||
_masterInfo._endpoint + ". Last tick available on master is '" + StringUtils::itoa(readTick) +
|
_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;
|
startTick = readTick;
|
||||||
|
@ -1337,6 +1338,7 @@ Result TailingSyncer::followMasterLog(TRI_voc_tick_t& fetchTick,
|
||||||
StringUtils::itoa(_configuration._chunkSize) + "&barrier=" +
|
StringUtils::itoa(_configuration._chunkSize) + "&barrier=" +
|
||||||
StringUtils::itoa(_barrierId);
|
StringUtils::itoa(_barrierId);
|
||||||
|
|
||||||
|
TRI_voc_tick_t const originalFetchTick = fetchTick;
|
||||||
worked = false;
|
worked = false;
|
||||||
|
|
||||||
std::string const url = baseUrl + "&from=" + StringUtils::itoa(fetchTick) +
|
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;
|
_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 '") +
|
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 +
|
StringUtils::itoa(fetchTick) + "' is not present (anymore?) on master at " + _masterInfo._endpoint +
|
||||||
". Last tick available on master is '" + StringUtils::itoa(tick) +
|
". Last tick available on master is '" + StringUtils::itoa(tick) +
|
||||||
"'. It may be required to do a full resync and increase the number " +
|
"'. 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;
|
TRI_voc_tick_t lastAppliedTick;
|
||||||
|
|
Loading…
Reference in New Issue