-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 4.2.0, 4.4.0
-
Component/s: Index Maintenance
-
None
-
Fully Compatible
-
ALL
-
v5.0, v4.4, v4.2
-
Execution Team 2021-07-26, Execution Team 2021-08-09
-
(copied to CRM)
-
137
The key insertion phase of a hybrid index build seems to hold and not yield an IX (w) lock. Any single command with an S (R) lock can block all operations during that time. In this case the offending command seems to be the read-only profile command (profile: -1)
original description
hello:
my mongo cluster is 4.2.8 with six data node.today i create index with follow command:
db.monitorIn.createIndex({ org: 1.0, et: 1.0, pbOrg: 1.0 });
index from 2020/10/22 09:58,to 10:30,all write is slow 10 times than before.it is :
Database: { acquireCount: { w: 3 }, acquireWaitCount: { w: 1 }, timeAcquiringMicros: { w: 3908088 } }.run in Index Build: inserting keys from external sorter into index mode,
all write is blocking.
2020-10-22T12:28:09.819+0800 I INDEX [conn997955] index build: inserted 439497660 keys from external sorter into index in 319 seconds.
all write is blocked time :319
from 2020-10-22T12:28:update time is 288831.
2020-10-22T12:28:10.853+0800 I WRITE [conn1004545] update expMonitordb.expInfos appName: "monitor_in_out" command: { q: { _id: "YT4873152410671", $or: [ { curT: { $exists: false } }, { curT: { $lt: new Date(1603336989000) } } ] }, u: { $set: { curT: new Date(1603336989000), currentOrg: "454001", currentOp: 131 } }, multi: false, upsert: false } planSummary: IXSCAN { _id: 1 } keysExamined:1 docsExamined:1 nMatched:1 nModified:1 numYields:0 queryHash:DE51A53B planCacheKey:2FB486A3 locks:{ ParallelBatchWriterMode: { acquireCount: { r: 2 } }, ReplicationStateTransition: { acquireCount: { w: 2 } }, Global: { acquireCount: { w: 2 } }, Database: { acquireCount: { w: 2 }, acquireWaitCount: { w: 1 }, timeAcquiringMicros: { w: 288830662 } }, Collection: { acquireCount: { w: 2 } }, Mutex: { acquireCount: { r: 5 } } } flowControl:{ acquireCount: 1, timeAcquiringMicros: 1 } storage:{} 288831ms
- is related to
-
SERVER-59190 IndexAccessMethod can be destructed during index build bulk load yield
- Closed
-
SERVER-59042 Remove special handling of index build bulk load lock yielding for multiversion tests after backports
- Closed
-
SERVER-53180 Log each operation that holds a lock for an extended period of time without yielding
- Closed
-
SERVER-55034 The profile command should not take S or X database locks
- Closed