Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-15406

Report write concern progress in currentOp

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Admin, Write Ops
    • None
    • Replication

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

      Attachments

        Activity

          People

            backlog-server-repl Backlog - Replication Team
            scotthernandez Scott Hernandez (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated: