Report write concern progress in currentOp

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Admin, Write Ops
    • None
    • Replication
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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" );
      

            Assignee:
            [DO NOT USE] Backlog - Replication Team
            Reporter:
            Scott Hernandez (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: