[SERVER-15233] Cannot run planCacheListQueryShapes on a Secondary Created: 12/Sep/14  Updated: 11/Jul/16  Resolved: 25/Sep/14

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: 2.6.4
Fix Version/s: 2.6.6, 2.7.7

Type: Bug Priority: Major - P3
Reporter: Andre de Frere Assignee: David Storch
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Operating System: ALL
Backport Completed:
Steps To Reproduce:
  1. connect to a secondary
  2. run db.test.getPlanCache().listQueryShapes()
Participants:

 Description   

Trying to run db.collection.getPlanCache().listQueryShapes() or

db.runCommand( { planCacheListQueryShapes : "collection" } ) 

on a Secondary will result in:

Error: not master at src/mongo/shell/collection.js:1571

or

{ "note" : "from execCommand", "ok" : 0, "errmsg" : "not master" }

Even if rs.slaveOK() is set



 Comments   
Comment by Githook User [ 18/Nov/14 ]

Author:

{u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'}

Message: SERVER-15233 allow plan cache commands to run on secondaries is slaveOk explicitly set to true

(cherry picked from commit 77b00970997d13d0758c745e5a94fc79982d4401)

Conflicts:
src/mongo/s/commands/cluster_plan_cache_cmd.cpp
Branch: v2.6
https://github.com/mongodb/mongo/commit/f420349563f0a4aff5f0ec1fcb6854e5e20f0a0a

Comment by Githook User [ 25/Sep/14 ]

Author:

{u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'}

Message: SERVER-15233 allow plan cache commands to run on secondaries is slaveOk explicitly set to true
Branch: master
https://github.com/mongodb/mongo/commit/77b00970997d13d0758c745e5a94fc79982d4401

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