1
0
Fork 0

Fixed and enabled an accidentially disabled assertion (#9970)

This commit is contained in:
Michael Hackstein 2019-09-11 09:10:48 +02:00 committed by KVS85
parent e99a7eea78
commit 9e76d995d0
1 changed files with 4 additions and 2 deletions

View File

@ -187,11 +187,13 @@ class FollowerInfo {
if (_canWrite) {
// Someone has decided we can write, fastPath!
#ifdef ARANGODB_USE_MAINTAINER_MODE
#ifdef ARANGODB_ENABLE_MAINTAINER_MODE
// Invariant, we can only WRITE if we do not have other failover candidates
READ_LOCKER(readLockerData, _dataLock);
TRI_ASSERT(_followers->size() == _failoverCandidates->size());
TRI_ASSERT(_followers->size() > _docColl->minReplicationFactor());
// Our follower list only contains followers, numFollowers + leader
// needs to be at least minReplicationFactor.
TRI_ASSERT(_followers->size() + 1 >= _docColl->minReplicationFactor());
#endif
return _canWrite;
}