mirror of https://github.com/mongodb/mongo
SERVER-43385 remove MMAPv1 references
This commit is contained in:
parent
dfbcc00f25
commit
8911b6cdda
|
|
@ -309,10 +309,7 @@ def find_mutex_holder(graph, thread_dict, show):
|
|||
|
||||
def find_lock_manager_holders(graph, thread_dict, show): # pylint: disable=too-many-locals
|
||||
"""Find lock manager holders."""
|
||||
# In versions of MongoDB 4.0 and older, the LockerImpl class is templatized with a boolean
|
||||
# parameter. With the removal of the MMAPv1 storage engine in MongoDB 4.2, the LockerImpl class
|
||||
# is no longer templatized.
|
||||
frame = find_frame(r'mongo::LockerImpl(?:\<.*\>)?::')
|
||||
frame = find_frame(r'mongo::LockerImpl::')
|
||||
if not frame:
|
||||
return
|
||||
|
||||
|
|
@ -321,15 +318,7 @@ def find_lock_manager_holders(graph, thread_dict, show): # pylint: disable=too-
|
|||
(_, lock_waiter_lwpid, _) = gdb.selected_thread().ptid
|
||||
lock_waiter = thread_dict[lock_waiter_lwpid]
|
||||
|
||||
try:
|
||||
locker_ptr_type = gdb.lookup_type("mongo::LockerImpl<false>").pointer()
|
||||
except gdb.error as err:
|
||||
# If we don't find the templatized version of the LockerImpl class, then we try to find the
|
||||
# non-templatized version.
|
||||
if not err.args[0].startswith("No type named"):
|
||||
raise
|
||||
|
||||
locker_ptr_type = gdb.lookup_type("mongo::LockerImpl").pointer()
|
||||
locker_ptr_type = gdb.lookup_type("mongo::LockerImpl").pointer()
|
||||
|
||||
lock_head = gdb.parse_and_eval(
|
||||
"mongo::getGlobalLockManager()->_getBucket(resId)->findOrInsert(resId)")
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ storage:
|
|||
journal:
|
||||
enabled: true
|
||||
# engine:
|
||||
# mmapv1:
|
||||
# wiredTiger:
|
||||
|
||||
# where to write logging data.
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ tasks:
|
|||
- func: "setup"
|
||||
- func: "run tests"
|
||||
vars:
|
||||
resmoke_args: "--suites=somesuite --storageEngine=mmapv1"
|
||||
resmoke_args: "--suites=somesuite --storageEngine=wiredTiger"
|
||||
|
||||
|
||||
modules:
|
||||
|
|
|
|||
|
|
@ -458,7 +458,7 @@ class TestVariant(unittest.TestCase):
|
|||
|
||||
# Check combined_resmoke_args when test_flags is set on the variant.
|
||||
resmoke_task = variant_ubuntu.get_task("resmoke_task")
|
||||
self.assertEqual("--suites=somesuite --storageEngine=mmapv1 --param=value --ubuntu",
|
||||
self.assertEqual("--suites=somesuite --storageEngine=wiredTiger --param=value --ubuntu",
|
||||
resmoke_task.combined_resmoke_args)
|
||||
|
||||
# Check combined_resmoke_args when the task doesn't have resmoke_args.
|
||||
|
|
@ -468,7 +468,7 @@ class TestVariant(unittest.TestCase):
|
|||
# Check combined_resmoke_args when test_flags is not set on the variant.
|
||||
variant_debian = self.conf.get_variant("debian")
|
||||
resmoke_task = variant_debian.get_task("resmoke_task")
|
||||
self.assertEqual("--suites=somesuite --storageEngine=mmapv1",
|
||||
self.assertEqual("--suites=somesuite --storageEngine=wiredTiger",
|
||||
resmoke_task.combined_resmoke_args)
|
||||
|
||||
# Check for tasks included in task_groups
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ storage:
|
|||
journal:
|
||||
enabled: true
|
||||
# engine:
|
||||
# mmapv1:
|
||||
# wiredTiger:
|
||||
|
||||
# where to write logging data.
|
||||
|
|
|
|||
|
|
@ -4,11 +4,9 @@
|
|||
* findAndModify_update_grow.js
|
||||
*
|
||||
* Each thread inserts a single document into a collection, and then
|
||||
* repeatedly performs the findAndModify command. Attempts to trigger
|
||||
* the same conditions that with MMAPv1 caused a document move,
|
||||
* by growing the size of the inserted document using the $set and $mul
|
||||
* update operators. Now checks that document moves don't happen and
|
||||
* that large changes in document size are handled correctly.
|
||||
* repeatedly performs the findAndModify command. Checks that document
|
||||
* moves don't happen and that large changes in document size are handled
|
||||
* correctly.
|
||||
*/
|
||||
load('jstests/concurrency/fsm_workload_helpers/server_types.js'); // for isMongod
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@ MongoRunner.stopMongod(m2);
|
|||
|
||||
// remove variables that depend on the way the test is started.
|
||||
delete m2result.parsed.net.transportLayer;
|
||||
delete m2result.parsed.storage.mmapv1;
|
||||
delete m2result.parsed.setParameter;
|
||||
delete m2result.parsed.storage.engine;
|
||||
delete m2result.parsed.storage.inMemory;
|
||||
|
|
@ -56,7 +55,6 @@ MongoRunner.stopMongod(m3);
|
|||
|
||||
// remove variables that depend on the way the test is started.
|
||||
delete m3result.parsed.net.transportLayer;
|
||||
delete m3result.parsed.storage.mmapv1;
|
||||
delete m3result.parsed.setParameter;
|
||||
delete m3result.parsed.storage.engine;
|
||||
delete m3result.parsed.storage.inMemory;
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@
|
|||
*/
|
||||
(function() {
|
||||
"use strict";
|
||||
var isDirectoryPerDBSupported = jsTest.options().storageEngine == "wiredTiger" ||
|
||||
jsTest.options().storageEngine == "mmapv1" || !jsTest.options().storageEngine;
|
||||
var isDirectoryPerDBSupported =
|
||||
jsTest.options().storageEngine == "wiredTiger" || !jsTest.options().storageEngine;
|
||||
if (!isDirectoryPerDBSupported)
|
||||
return;
|
||||
|
||||
|
|
|
|||
|
|
@ -42,8 +42,7 @@ twoPhaseDropTest.createCollection(fromCollName);
|
|||
twoPhaseDropTest.createCollection(toCollName);
|
||||
|
||||
// Collection renames with dropTarget set to true should handle long index names in the target
|
||||
// collection gracefully. MMAPv1 imposes a hard limit on index namespaces so we have to drop
|
||||
// indexes that are too long to store on disk after renaming the collection.
|
||||
// collection gracefully.
|
||||
const primary = replTest.getPrimary();
|
||||
const testDb = primary.getDB(dbName);
|
||||
const fromColl = testDb.getCollection(fromCollName);
|
||||
|
|
|
|||
|
|
@ -1778,7 +1778,7 @@ Examples:
|
|||
--crashOption output1
|
||||
--sshCrashUserHost admin@10.4.100.2
|
||||
--sshCrashOption "-oKexAlgorithms=+diffie-hellman-group1-sha1 -i /Users/jonathan/.ssh/mFi.pem"
|
||||
--mongodOptions "--storageEngine mmapv1"
|
||||
--mongodOptions "--storageEngine wiredTiger"
|
||||
|
||||
Linux server running in AWS, testing nojournal:
|
||||
python powertest.py
|
||||
|
|
@ -1978,9 +1978,7 @@ Examples:
|
|||
mongod_options.add_option(
|
||||
"--removeLockFile", dest="remove_lock_file",
|
||||
help="If specified, the mongod.lock file will be deleted after a"
|
||||
" powercycle event, before mongod is started. This is a"
|
||||
" workaround for mongod failing start with MMAPV1 (See"
|
||||
" SERVER-15109).", action="store_true", default=False)
|
||||
" powercycle event, before mongod is started.", action="store_true", default=False)
|
||||
|
||||
# Client options
|
||||
mongo_path = distutils.spawn.find_executable("dist-test/bin/mongo",
|
||||
|
|
|
|||
|
|
@ -251,7 +251,7 @@ Status createCollectionForApplyOps(OperationContext* opCtx,
|
|||
// collection already exists under a different name. If so, rename it into place. As this is
|
||||
// done during replay of the oplog, the operations do not need to be atomic, just idempotent.
|
||||
// We need to do the renaming part in a separate transaction, as we cannot transactionally
|
||||
// create a database on MMAPv1, which could result in createCollection failing if the database
|
||||
// create a database, which could result in createCollection failing if the database
|
||||
// does not yet exist.
|
||||
if (ui) {
|
||||
// Return an optional, indicating whether we need to early return (if the collection already
|
||||
|
|
@ -291,11 +291,7 @@ Status createCollectionForApplyOps(OperationContext* opCtx,
|
|||
// In the case of oplog replay, a future command may have created or renamed a
|
||||
// collection with that same name. In that case, renaming this future collection to
|
||||
// a random temporary name is correct: once all entries are replayed no temporary
|
||||
// names will remain. On MMAPv1 the rename can result in index names that are too
|
||||
// long. However this should only happen for initial sync and "resync collection"
|
||||
// for rollback, so we can let the error propagate resulting in an abort and restart
|
||||
// of the initial sync or result in rollback to fassert, requiring a resync of that
|
||||
// node.
|
||||
// names will remain.
|
||||
const bool stayTemp = true;
|
||||
auto futureColl = db
|
||||
? CollectionCatalog::get(opCtx).lookupCollectionByNamespace(opCtx, newCollName)
|
||||
|
|
|
|||
|
|
@ -229,9 +229,6 @@ Status renameCollectionAndDropTarget(OperationContext* opCtx,
|
|||
// Target collection exists - drop it.
|
||||
invariant(options.dropTarget);
|
||||
|
||||
// If this rename collection is replicated, check for long index names in the target
|
||||
// collection that may exceed the MMAPv1 namespace limit when the target collection
|
||||
// is renamed with a drop-pending namespace.
|
||||
auto replCoord = repl::ReplicationCoordinator::get(opCtx);
|
||||
auto isOplogDisabledForNamespace = replCoord->isOplogDisabledFor(opCtx, target);
|
||||
if (!isOplogDisabledForNamespace) {
|
||||
|
|
|
|||
|
|
@ -264,10 +264,9 @@ ProcessOplogResult processSessionOplog(const BSONObj& oplogBSON,
|
|||
NamespaceString::kSessionTransactionsTableNamespace.ns(),
|
||||
[&] {
|
||||
// Need to take global lock here so repl::logOp will not unlock it and trigger the
|
||||
// invariant that disallows unlocking global lock while inside a WUOW. Grab a DBLock
|
||||
// here instead of plain GlobalLock to make sure the MMAPV1 flush lock will be
|
||||
// lock/unlocked correctly. Take the transaction table db lock to ensure the same lock
|
||||
// ordering with normal replicated updates to the table.
|
||||
// invariant that disallows unlocking global lock while inside a WUOW. Take the
|
||||
// transaction table db lock to ensure the same lock ordering with normal replicated
|
||||
// updates to the table.
|
||||
Lock::DBLock lk(
|
||||
opCtx, NamespaceString::kSessionTransactionsTableNamespace.db(), MODE_IX);
|
||||
WriteUnitOfWork wunit(opCtx);
|
||||
|
|
|
|||
|
|
@ -37,8 +37,7 @@
|
|||
|
||||
namespace mongo {
|
||||
/**
|
||||
* This class is for use with non-MMAPv1 storage engines that track record store sizes in catalog
|
||||
* metadata.
|
||||
* This class is for use with storage engines that track record store sizes in catalog metadata.
|
||||
*
|
||||
* During normal server operation, we adjust the size metadata for all record stores. But when
|
||||
* performing replication recovery, we avoid doing so, as we trust that the size metadata on disk is
|
||||
|
|
|
|||
|
|
@ -159,13 +159,6 @@ public:
|
|||
|
||||
static bool blockInMemory(const void* start);
|
||||
|
||||
/**
|
||||
* Returns a positive floating point number between 0.0 and 1.0 to inform MMapV1 how much it
|
||||
* must remap pages to bring the system page file implementation back below a certain
|
||||
* threshold. A number of 1.0 means remap everything.
|
||||
*/
|
||||
static double getSystemMemoryPressurePercentage();
|
||||
|
||||
/**
|
||||
* @return a pointer aligned to the start of the page the provided pointer belongs to.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -120,10 +120,6 @@ int ProcessInfo::getResidentSize() {
|
|||
return rss;
|
||||
}
|
||||
|
||||
double ProcessInfo::getSystemMemoryPressurePercentage() {
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
void ProcessInfo::SystemInfo::collectSystemInfo() {
|
||||
osType = "BSD";
|
||||
osName = "FreeBSD";
|
||||
|
|
|
|||
|
|
@ -538,10 +538,6 @@ int ProcessInfo::getResidentSize() {
|
|||
return (int)((p.getResidentSizeInPages() * getPageSize()) / (1024.0 * 1024));
|
||||
}
|
||||
|
||||
double ProcessInfo::getSystemMemoryPressurePercentage() {
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
void ProcessInfo::getExtraInfo(BSONObjBuilder& info) {
|
||||
struct rusage ru;
|
||||
getrusage(RUSAGE_SELF, &ru);
|
||||
|
|
|
|||
|
|
@ -130,10 +130,6 @@ int ProcessInfo::getResidentSize() {
|
|||
return rss;
|
||||
}
|
||||
|
||||
double ProcessInfo::getSystemMemoryPressurePercentage() {
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
void ProcessInfo::SystemInfo::collectSystemInfo() {
|
||||
osType = "BSD";
|
||||
osName = "OpenBSD";
|
||||
|
|
|
|||
|
|
@ -116,10 +116,6 @@ int ProcessInfo::getResidentSize() {
|
|||
return (int)(ti.resident_size / (1024 * 1024));
|
||||
}
|
||||
|
||||
double ProcessInfo::getSystemMemoryPressurePercentage() {
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
void ProcessInfo::getExtraInfo(BSONObjBuilder& info) {
|
||||
struct task_events_info taskInfo;
|
||||
mach_msg_type_number_t taskInfoCount = TASK_EVENTS_INFO_COUNT;
|
||||
|
|
|
|||
|
|
@ -124,10 +124,6 @@ int ProcessInfo::getResidentSize() {
|
|||
return static_cast<int>(p.psinfo.pr_rssize / 1024);
|
||||
}
|
||||
|
||||
double ProcessInfo::getSystemMemoryPressurePercentage() {
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
void ProcessInfo::getExtraInfo(BSONObjBuilder& info) {
|
||||
ProcUsage p;
|
||||
info.appendNumber("page_faults", static_cast<long long>(p.prusage.pr_majf));
|
||||
|
|
|
|||
|
|
@ -51,10 +51,6 @@ int ProcessInfo::getResidentSize() {
|
|||
return -1;
|
||||
}
|
||||
|
||||
double ProcessInfo::getSystemMemoryPressurePercentage() {
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
bool ProcessInfo::checkNumaEnabled() {
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -97,45 +97,6 @@ int ProcessInfo::getResidentSize() {
|
|||
return _wconvertmtos(pmc.WorkingSetSize);
|
||||
}
|
||||
|
||||
double ProcessInfo::getSystemMemoryPressurePercentage() {
|
||||
MEMORYSTATUSEX mse;
|
||||
mse.dwLength = sizeof(mse);
|
||||
BOOL status = GlobalMemoryStatusEx(&mse);
|
||||
if (!status) {
|
||||
DWORD gle = GetLastError();
|
||||
LOGV2_ERROR(23814,
|
||||
"GlobalMemoryStatusEx failed with {errnoWithDescription_gle}",
|
||||
"errnoWithDescription_gle"_attr = errnoWithDescription(gle));
|
||||
fassert(28623, status);
|
||||
}
|
||||
|
||||
DWORDLONG totalPageFile = mse.ullTotalPageFile;
|
||||
if (totalPageFile == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// If the page file is >= 50%, say we are low on system memory
|
||||
// If the page file is >= 75%, we are running very low on system memory
|
||||
//
|
||||
DWORDLONG highWatermark = totalPageFile / 2;
|
||||
DWORDLONG veryHighWatermark = 3 * (totalPageFile / 4);
|
||||
|
||||
DWORDLONG usedPageFile = mse.ullTotalPageFile - mse.ullAvailPageFile;
|
||||
|
||||
// Below the watermark, we are fine
|
||||
// Also check we will not do a divide by zero below
|
||||
if (usedPageFile < highWatermark || veryHighWatermark <= highWatermark) {
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
// Above the high watermark, we tell MMapV1 how much to remap
|
||||
// < 1.0, we have some pressure, but not much so do not be very aggressive
|
||||
// 1.0 = we are at very high watermark, remap everything
|
||||
// > 1.0, the user may run out of memory, remap everything
|
||||
// i.e., Example (N - 50) / (75 - 50)
|
||||
return static_cast<double>(usedPageFile - highWatermark) / (veryHighWatermark - highWatermark);
|
||||
}
|
||||
|
||||
void ProcessInfo::getExtraInfo(BSONObjBuilder& info) {
|
||||
MEMORYSTATUSEX mse;
|
||||
mse.dwLength = sizeof(mse);
|
||||
|
|
|
|||
Loading…
Reference in New Issue