mirror of https://gitee.com/bigwinds/arangodb
switch default message for requireFromPresent (#7439)
This commit is contained in:
parent
3322cc5ae2
commit
f90b48f792
|
@ -59,7 +59,7 @@ ReplicationApplierConfiguration::ReplicationApplierConfiguration()
|
|||
_adaptivePolling(true),
|
||||
_autoResync(false),
|
||||
_includeSystem(true),
|
||||
_requireFromPresent(false),
|
||||
_requireFromPresent(true),
|
||||
_incremental(false),
|
||||
_verbose(false),
|
||||
_restrictType(RestrictType::None),
|
||||
|
@ -90,7 +90,7 @@ void ReplicationApplierConfiguration::reset() {
|
|||
_adaptivePolling = true;
|
||||
_autoResync = false;
|
||||
_includeSystem = true;
|
||||
_requireFromPresent = false;
|
||||
_requireFromPresent = true;
|
||||
_incremental = false;
|
||||
_verbose = false;
|
||||
_restrictType = RestrictType::None;
|
||||
|
|
|
@ -1604,17 +1604,18 @@ Result TailingSyncer::fetchOpenTransactions(TRI_voc_tick_t fromTick,
|
|||
|
||||
TRI_voc_tick_t readTick = StringUtils::uint64(header);
|
||||
|
||||
if (!fromIncluded && _requireFromPresent && fromTick > 0 &&
|
||||
(!_state.master.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 " +
|
||||
_state.master.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/WAL file timeout on the master.");
|
||||
if (!fromIncluded && fromTick > 0 && (!_state.master.simulate32Client() || fromTick != readTick)) {
|
||||
const std::string msg = std::string("required init tick value '") +
|
||||
StringUtils::itoa(fromTick) +
|
||||
"' is not present (anymore?) on master at " +
|
||||
_state.master.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/WAL file timeout on the master.";
|
||||
if (_requireFromPresent) { // hard fail
|
||||
return Result(TRI_ERROR_REPLICATION_START_TICK_NOT_PRESENT, msg);
|
||||
}
|
||||
LOG_TOPIC(WARN, Logger::REPLICATION) << msg;
|
||||
}
|
||||
|
||||
startTick = readTick;
|
||||
|
@ -1838,18 +1839,20 @@ Result TailingSyncer::processMasterLog(std::shared_ptr<Syncer::JobSynchronizer>
|
|||
_applier->_state._lastAvailableContinuousTick = tick;
|
||||
}
|
||||
|
||||
if (!fromIncluded && _requireFromPresent && fetchTick > 0 &&
|
||||
(!_state.master.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 " +
|
||||
_state.master.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/WAL file timeout on the master");
|
||||
if (!fromIncluded && fetchTick > 0 && (!_state.master.simulate32Client() || originalFetchTick != tick)) {
|
||||
const std::string msg = std::string("required follow tick value '") +
|
||||
StringUtils::itoa(fetchTick) +
|
||||
"' is not present (anymore?) on master at " +
|
||||
_state.master.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/WAL file timeout on the master";
|
||||
if (_requireFromPresent) { // hard fail
|
||||
return Result(TRI_ERROR_REPLICATION_START_TICK_NOT_PRESENT, msg);
|
||||
}
|
||||
LOG_TOPIC(WARN, Logger::REPLICATION) << msg;
|
||||
}
|
||||
|
||||
// already fetch next batch of data in the background...
|
||||
|
|
|
@ -95,6 +95,7 @@ const compare = function (masterFunc, masterFunc2, slaveFuncOngoing, slaveFuncFi
|
|||
applierConfiguration.username = 'root';
|
||||
applierConfiguration.password = '';
|
||||
applierConfiguration.force32mode = true;
|
||||
applierConfiguration.requireFromPresent = false;
|
||||
|
||||
if (!applierConfiguration.hasOwnProperty('chunkSize')) {
|
||||
applierConfiguration.chunkSize = 16384;
|
||||
|
|
|
@ -53,6 +53,7 @@ const config = {
|
|||
username: username,
|
||||
password: password,
|
||||
verbose: true,
|
||||
requireFromPresent: false
|
||||
};
|
||||
|
||||
// We allow the replication a delay of this many seconds at most
|
||||
|
|
|
@ -83,6 +83,7 @@ const compare = function (masterFunc, masterFunc2, slaveFuncOngoing, slaveFuncFi
|
|||
applierConfiguration.password = '';
|
||||
applierConfiguration.includeSystem = false;
|
||||
applierConfiguration.force32mode = false;
|
||||
applierConfiguration.requireFromPresent = false;
|
||||
|
||||
var syncResult = replication.syncGlobal({
|
||||
endpoint: masterEndpoint,
|
||||
|
|
|
@ -98,6 +98,7 @@ const compare = function (masterFunc, masterFunc2, slaveFuncOngoing, slaveFuncFi
|
|||
applierConfiguration.username = 'root';
|
||||
applierConfiguration.password = '';
|
||||
applierConfiguration.force32mode = false;
|
||||
applierConfiguration.requireFromPresent = false;
|
||||
|
||||
if (!applierConfiguration.hasOwnProperty('chunkSize')) {
|
||||
applierConfiguration.chunkSize = 16384;
|
||||
|
|
Loading…
Reference in New Issue