[SERVER-18795] db.printSlaveReplicationInfo()/rs.printSlaveReplicationInfo() can not work with ARBITER role Created: 03/Jun/15  Updated: 04/Jun/16  Resolved: 11/Jun/15

Status: Closed
Project: Core Server
Component/s: Admin, Shell
Affects Version/s: 2.6.10
Fix Version/s: 2.6.11, 3.0.5, 3.1.5

Type: Improvement Priority: Minor - P4
Reporter: Jiangcheng Wu Assignee: Sam Kleinman (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Backport Completed:
Sprint: Build 5 06/26/16
Participants:

 Description   

rs.printSlaveReplicationInfo()\db.printSlaveReplicationInfo() both can't.

mongo localhost:27018                                                                                                                                  
MongoDB shell version: 2.6.10
connecting to: localhost:27018/test
SHARD04:ARBITER> db.printSlaveReplicationInfo()
source: mgsh43.avoscloud.com:27018
assert failed : how could this be null (getReplLag startOptimeDate)
Error: assert failed : how could this be null (getReplLag startOptimeDate)
    at Error (<anonymous>)
    at doassert (src/mongo/shell/assert.js:11:14)
    at assert (src/mongo/shell/assert.js:20:5)
    at getReplLag (src/mongo/shell/db.js:768:9)
    at r (src/mongo/shell/db.js:809:13)
    at Array.forEach (native)
    at DB.printSlaveReplicationInfo (src/mongo/shell/db.js:821:24)
    at (shell):1:4
2015-06-03T16:33:10.395+0800 Error: assert failed : how could this be null (getReplLag startOptimeDate) at src/mongo/shell/assert.js:13
SHARD04:ARBITER> 

And there are no exception msg in mongod log.



 Comments   
Comment by Githook User [ 25/Jun/15 ]

Author:

{u'username': u'tychoish', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'}

Message: SERVER-18795: fix backport of printSlaveReplicationInfo on arbiters

(cherry picked from commit a204c686cc4d6ec47aeffe76758d11d161b69caf)
Branch: v3.0
https://github.com/mongodb/mongo/commit/b7192873095cf50a4d39d65daac31d9de1db9598

Comment by Githook User [ 25/Jun/15 ]

Author:

{u'username': u'tychoish', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'}

Message: SERVER-18795: provide better printReplicationInfo error message for abiters

(cherry picked from commit ccd9f983b4359cae967f32ff5e44a3399a4a4682)
Branch: v3.0
https://github.com/mongodb/mongo/commit/ef5f65566e79b1d28b5eb5c0ab24838c10a44050

Comment by Githook User [ 11/Jun/15 ]

Author:

{u'username': u'tychoish', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'}

Message: SERVER-18795: fix backport of printSlaveReplicationInfo on arbiters
Branch: master
https://github.com/mongodb/mongo/commit/a204c686cc4d6ec47aeffe76758d11d161b69caf

Comment by Githook User [ 11/Jun/15 ]

Author:

{u'username': u'tychoish', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'}

Message: SERVER-18795: provide better printReplicationInfo error message for abiters
Branch: master
https://github.com/mongodb/mongo/commit/ccd9f983b4359cae967f32ff5e44a3399a4a4682

Comment by Githook User [ 11/Jun/15 ]

Author:

{u'username': u'tychoish', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'}

Message: SERVER-18795: provide better printReplicationInfo error message for abiters
Branch: v2.6
https://github.com/mongodb/mongo/commit/12ee0ef37a3c5d742f5bb29f96654155358f2eb4

Comment by Sam Kleinman (Inactive) [ 03/Jun/15 ]

I was able to reproduce this with 2.6, but not on 3.0 or master.

Thanks for the report, we'll get this processed and triaged promptly!

Cheers,
sam

Generated at Thu Feb 08 03:48:46 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.