[SERVER-6322] Unbalanced read load on secondaries caused replRead.js in slowNightly to fail Created: 06/Jul/12  Updated: 11/Jul/16  Resolved: 09/Jul/12

Status: Closed
Project: Core Server
Component/s: Internal Client
Affects Version/s: 2.1.2
Fix Version/s: 2.2.0-rc0

Type: Bug Priority: Major - P3
Reporter: Randolph Tan Assignee: Randolph Tan
Resolution: Done Votes: 0
Labels: buildbot
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

http://buildlogs.mongodb.org/build/4ff70222d2a60f11a9000e2c/test/4ff70224d2a60f11c7000dd5/

Excerpt from logs:

("[10] != [20] are not equal : Wrong number of read queries sent to secondary 0 ...
@/home/yellow/buildslave/Linux_64bit_DUR_OFF/mongo/jstests/slowNightly/replReads.js:118
 
Fri Jul  6 11:20:41 warning: log line attempted (10k) over max size(10k), printing beginning and end ... uncaught exception: [10] != [20] are not equal : Wrong number of read queries sent to secondary 0 [



 Comments   
Comment by auto [ 09/Jul/12 ]

Author:

{u'date': u'2012-07-06T08:47:47-07:00', u'email': u'randolph@10gen.com', u'name': u'Randolph Tan'}

Message: SERVER-6322 Unbalanced read load on secondaries caused replRead.js in slowNightly to fail
Branch: master
https://github.com/mongodb/mongo/commit/3b0834143f69813e27cc08fca4a06a1cf1f97c5d

Comment by Randolph Tan [ 06/Jul/12 ]

Cause: the last host passed to the _selectNode method for round robin selection comes from the DBClientReplicaSet which is always initialized as an empty host for a newly created connection. This in turn will make _selectNode always select the same node at the first time a slaveOk operation is performed on DBClientReplicaSet.

Fix: store the last host information in the ReplicaSetMonitor, just like the _nextSlave member variable used by the now deprecated getSlave() method (which only exists because it was part of the public interface).

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