-
Type:
Improvement
-
Resolution: Won't Fix
-
Priority:
Major - P3
-
None
-
Affects Version/s: 3.1.7
-
Component/s: Storage
-
None
-
QuInt A (10/12/15)
-
None
-
None
-
None
-
None
-
None
-
None
-
None
WiredTigerKVEngine::initRsOplogBackgroundThread() starts a background thread for any namespace that starts with "local.oplog."
// static
bool WiredTigerKVEngine::initRsOplogBackgroundThread(StringData ns) {
if (!NamespaceString::oplog(ns)) {
return false;
}
if (storageGlobalParams.repair) {
LOG(1) << "not starting WiredTigerRecordStoreThread for " << ns
<< " because we are in repair";
return false;
}
stdx::lock_guard<stdx::mutex> lock(_backgroundThreadMutex);
NamespaceString nss(ns);
if (_backgroundThreadNamespaces.count(nss)) {
log() << "WiredTigerRecordStoreThread " << ns << " already started";
} else {
log() << "Starting WiredTigerRecordStoreThread " << ns;
BackgroundJob* backgroundThread = new WiredTigerRecordStoreThread(nss);
backgroundThread->go();
_backgroundThreadNamespaces.insert(nss);
}
return true;
}
Instead, it should only start a background thread for the oplog that will be inserted into when logOp() is called. A background thread should not be started if replication isn't enabled.
This allows users to do updates that change the size of a document on a non-active oplog after SERVER-19551.