[SERVER-11943] moveChunk can return with an error for reasons that are not accurately logged Created: 03/Dec/13  Updated: 04/Sep/14  Resolved: 30/May/14

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 2.4.8
Fix Version/s: 2.7.2

Type: Bug Priority: Major - P3
Reporter: William Zola Assignee: David Hows
Resolution: Done Votes: 0
Labels: community-team, pull-request
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Server 2.7.2
Participants:

 Description   

storeCurrentLocs can print error messages of the form:

warning: can't move chunk of size (approximately) 50789556 because maximum size allowed to move is 67108864 ns: test.test { tu: 6587309, _id: 156274579 } -> { tu: 6593669, _id: 109335516 }

Note that 50789556 is less than 67108864.

This is due to a confusing error message in lines 533-540 of d_migrate.cpp. This error condition is triggered when the number of records seen in the chunk is larger than maxRecsWhenFull. In turn, maxRecsWhenFull is set to the smaller of

  • 1.3 * (maxChunkSize / avgRecSize)
  • 250000

This means that if the average record size is small, storeCurrentLocs() will error out due to exceeding the maximum number of records in a chunk, and will produce the confusing error message shown.

At the least, the error message should be changed so that we display the correct reason for the moveChunk command failing.



 Comments   
Comment by Githook User [ 30/May/14 ]

Author:

{u'username': u'daveh86', u'name': u'daveh86', u'email': u'howsdav@gmail.com'}

Message: SERVER-11943 display the correct reason for the moveChunk command failing.

Signed-off-by: Benety Goh <benety@mongodb.com>
Branch: master
https://github.com/mongodb/mongo/commit/4055286cf8a6870f371f5dc476cd767bf50b75e9

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