1
0
Fork 0

yet some more replication tests adjustments (#8101)

This commit is contained in:
Jan 2019-02-04 16:53:15 +01:00 committed by GitHub
parent db70847ab1
commit 4ee7ff1932
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 18 additions and 27 deletions

View File

@ -1898,15 +1898,6 @@ Result TailingSyncer::processMasterLog(std::shared_ptr<Syncer::JobSynchronizer>
return r;
}
{
// TODO: this is just for debugging. remove later!
READ_LOCKER_EVENTUAL(writeLocker, _applier->_statusLock);
LOG_TOPIC(DEBUG, Logger::REPLICATION) << "applyLog finished. "
<< "lastAppliedContinuousTick: " << _applier->_state._lastAppliedContinuousTick
<< ", lastProcessedContinuousTick: " << _applier->_state._lastProcessedContinuousTick;
}
if (!worked) {
if (checkMore) {
worked = true;

View File

@ -85,7 +85,7 @@ function ReplicationSuite() {
masterFunc(state);
// use lastLogTick as of now
state.lastLogTick = replication.logger.state().state.lastLogTick;
state.lastLogTick = replication.logger.state().state.lastUncommittedLogTick;
db._useDatabase("_system");
connectToSlave();

View File

@ -92,7 +92,7 @@ function ReplicationSuite() {
masterFunc2(state);
// use lastLogTick as of now
state.lastLogTick = replication.logger.state().state.lastLogTick;
state.lastLogTick = replication.logger.state().state.lastUncommittedLogTick;
let applierConfiguration = {
endpoint: masterEndpoint,

View File

@ -88,7 +88,7 @@ const compare = function (masterFunc, masterFunc2, slaveFuncOngoing, slaveFuncFi
masterFunc2(state);
// use lastLogTick as of now
state.lastLogTick = replication.logger.state().state.lastLogTick;
state.lastLogTick = replication.logger.state().state.lastUncommittedLogTick;
applierConfiguration = applierConfiguration || {};
applierConfiguration.endpoint = masterEndpoint;
@ -552,7 +552,7 @@ function BaseTestConfig () {
return 'wait';
} catch (err) {
// task does not exist. we're done
state.lastLogTick = replication.logger.state().state.lastLogTick;
state.lastLogTick = replication.logger.state().state.lastUncommittedLogTick;
state.checksum = collectionChecksum(cn);
state.count = collectionCount(cn);
assertEqual(20, state.count);
@ -638,7 +638,7 @@ function BaseTestConfig () {
return 'wait';
} catch (err) {
// task does not exist anymore. we're done
state.lastLogTick = replication.logger.state().state.lastLogTick;
state.lastLogTick = replication.logger.state().state.lastUncommittedLogTick;
state.checksum = collectionChecksum(cn);
state.count = collectionCount(cn);
assertEqual(20, state.count);

View File

@ -115,7 +115,7 @@ var compare = function (masterFunc, masterFunc2, slaveFuncOngoing, slaveFuncFina
masterFunc2(state);
// use lastLogTick as of now
state.lastLogTick = replication.logger.state().state.lastLogTick;
state.lastLogTick = replication.logger.state().state.lastUncommittedLogTick;
applierConfiguration = applierConfiguration || {};
applierConfiguration.endpoint = masterEndpoint;

View File

@ -115,7 +115,7 @@ var compare = function (masterFunc, masterFunc2, slaveFuncOngoing, slaveFuncFina
masterFunc2(state);
// use lastLogTick as of now
state.lastLogTick = replication.logger.state().state.lastLogTick;
state.lastLogTick = replication.logger.state().state.lastUncommittedLogTick;
applierConfiguration = applierConfiguration || {};
applierConfiguration.endpoint = masterEndpoint;

View File

@ -86,7 +86,7 @@ const waitForReplication = function() {
const wasOnMaster = onMaster;
connectToMaster();
// use lastLogTick as of now
const lastLogTick = replication.logger.state().state.lastLogTick;
const lastLogTick = replication.logger.state().state.lastUncommittedLogTick;
// We only wait a defined time.
const timeOut = time() + delay * 1000;
connectToSlave();

View File

@ -102,7 +102,7 @@ const compare = function (masterFunc, masterFunc2, slaveFuncOngoing, slaveFuncFi
masterFunc2(state);
// use lastLogTick as of now
state.lastLogTick = replication.logger.state().state.lastLogTick;
state.lastLogTick = replication.logger.state().state.lastUncommittedLogTick;
if (!applierConfiguration.hasOwnProperty('chunkSize')) {
applierConfiguration.chunkSize = 16384;
@ -640,7 +640,7 @@ function BaseTestConfig () {
return 'wait';
} catch (err) {
// task does not exist. we're done
state.lastLogTick = replication.logger.state().state.lastLogTick;
state.lastLogTick = replication.logger.state().state.lastUncommittedLogTick;
state.checksum = collectionChecksum(cn);
state.count = collectionCount(cn);
assertEqual(20, state.count);
@ -726,7 +726,7 @@ function BaseTestConfig () {
return 'wait';
} catch (err) {
// task does not exist anymore. we're done
state.lastLogTick = replication.logger.state().state.lastLogTick;
state.lastLogTick = replication.logger.state().state.lastUncommittedLogTick;
state.checksum = collectionChecksum(cn);
state.count = collectionCount(cn);
assertEqual(20, state.count);
@ -1243,7 +1243,7 @@ function ReplicationOtherDBSuite () {
const cn2 = cn + 'Test';
db._create(cn2);
let lastLogTick = replication.logger.state().state.lastLogTick;
let lastLogTick = replication.logger.state().state.lastUncommittedLogTick;
// Section - Follower
connectToSlave();

View File

@ -91,7 +91,7 @@ const compare = function (masterFunc, masterFunc2, slaveFuncOngoing, slaveFuncFi
masterFunc2(state);
// use lastLogTick as of now
state.lastLogTick = replication.logger.state().state.lastLogTick;
state.lastLogTick = replication.logger.state().state.lastUncommittedLogTick;
applierConfiguration = applierConfiguration || {};
applierConfiguration.endpoint = masterEndpoint;
@ -718,7 +718,7 @@ function BaseTestConfig () {
return 'wait';
} catch (err) {
// task does not exist. we're done
state.lastLogTick = replication.logger.state().state.lastLogTick;
state.lastLogTick = replication.logger.state().state.lastUncommittedLogTick;
state.checksum = collectionChecksum(cn);
state.count = collectionCount(cn);
assertEqual(20, state.count);
@ -804,7 +804,7 @@ function BaseTestConfig () {
return 'wait';
} catch (err) {
// task does not exist anymore. we're done
state.lastLogTick = replication.logger.state().state.lastLogTick;
state.lastLogTick = replication.logger.state().state.lastUncommittedLogTick;
state.checksum = collectionChecksum(cn);
state.count = collectionCount(cn);
assertEqual(20, state.count);
@ -1368,7 +1368,7 @@ function ReplicationOtherDBSuite () {
// Flush wal to trigger replication
internal.wal.flush(true, true);
const lastLogTick = replication.logger.state().state.lastLogTick;
const lastLogTick = replication.logger.state().state.lastUncommittedLogTick;
// Section - Slave
connectToSlave();
@ -1408,7 +1408,7 @@ function ReplicationOtherDBSuite () {
let dbs = db._databases();
assertEqual(-1, dbs.indexOf(dbName));
const lastLogTick = replication.logger.state().state.lastLogTick;
const lastLogTick = replication.logger.state().state.lastUncommittedLogTick;
// Section - Slave
connectToSlave();

View File

@ -94,7 +94,7 @@ function ReplicationSuite() {
masterFunc2(state);
// use lastLogTick as of now
state.lastLogTick = replication.logger.state().state.lastLogTick;
state.lastLogTick = replication.logger.state().state.lastUncommittedLogTick;
let applierConfiguration = {
endpoint: masterEndpoint,