-
Type: Bug
-
Resolution: Won't Fix
-
Priority: Major - P3
-
None
-
Affects Version/s: 3.4.4, 3.4.19, 3.4.20
-
Component/s: Replication
-
Replication
-
ALL
-
A replSet has three members, aa/bb/cc. In this situation , aa->bb->cc , aa is primary and the sync source of bb , bb is the sync source of cc . aa advances the lastCommittedOpTime , and it signal OplogWaiters , so bb can advance his lastCommittedOpTime , but sometimes cc couldn't advance its lastCommittedOpTime.
The key problem here is the _localOplogCollection always is NULL for secondary.
@oplog.cpp
void signalOplogWaiters() {
if (_localOplogCollection) {
_localOplogCollection->notifyCappedWaitersIfNeeded();
}
}
the only way to set _localOplogCollection is in function getLocalOplogCollection,and called here.
void logOp(OperationContext* txn, const char* opstr, const char* ns, const BSONObj& obj, const BSONObj* o2, bool fromMigrate) void logOps(OperationContext* txn, const char* opstr, const NamespaceString& nss, std::vector<BSONObj>::const_iterator begin, std::vector<BSONObj>::const_iterator end, bool fromMigrate)
but for secondary ,it returned early because of oplog Disabled.
So because _localOplogCollection = NULL , when secondary update _lastCommittedOpTime , it cann't signal OplogWaiters.
- duplicates
-
SERVER-30827 Provide new interface for getting new OpTimes for vector insert from the optime generator
- Closed
- is duplicated by
-
SERVER-40065 spike latency issue on shard cluster
- Closed