Description
We only report that an op is "waiting for write concern" but not its progress. We should update the message as we wait to provide progress on steps completed and pending.
Example op wait for w:2 on a 1 node repica set:
{
|
... "opid" : 22,
|
"active" : true,
|
"secs_running" : 9,
|
"op" : "query",
|
"ns" : "",
|
"query" : {
|
"insert" : "a",
|
"documents" : [{"_id" : "ts1",}],
|
"ordered" : true,
|
"writeConcern" : {"w" : 2}
|
},
|
"msg" : "waiting for write concern",
|
"lockStats" : {
|
"timeLockedMicros" : {
|
"r" : NumberLong(0),
|
"w" : NumberLong(9)
|
},
|
"timeAcquiringMicros" : {
|
"r" : NumberLong(0),
|
"w" : NumberLong(0)
|
}}}]}
|
Currently we set the status here:
src/mongo//db/commands/get_last_error.cpp:236: txn->setMessage( "waiting for write concern" );
|
src/mongo//db/commands/write_commands/batch_executor.cpp:270: _txn->getCurOp()->setMessage( "waiting for write concern" );
|