[SERVER-15297] Improve log message for case when can't find shard to move chunk to Created: 17/Sep/14  Updated: 04/Apr/23  Resolved: 04/Apr/23

Status: Closed
Project: Core Server
Component/s: Logging
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Trivial - P5
Reporter: Valeri Karpov Assignee: [DO NOT USE] Backlog - Sharding EMEA
Resolution: Done Votes: 0
Labels: RachitaD
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Sharding EMEA
Participants:

 Description   

Right now just logs "no where to put it " (https://github.com/vkarpov15/mongo/blob/master/src/mongo/s/balancer_policy.cpp#L404), which is a little silly.



 Comments   
Comment by Gianfranco Palumbo [ 27/Apr/15 ]

The warning now in master is as follows, is that ok?:

                warning() << "can't find any chunk to move from: " << shard
                          << " but we want to. "
                          << " numJumboChunks: " << numJumboChunks
                          << endl;

https://github.com/mongodb/mongo/blob/master/src/mongo/s/balancer_policy.cpp#L399-L402

Comment by Scott Hernandez (Inactive) [ 18/Sep/14 ]

The pull request is an improvement in some respects but it looks like all the messages in the tag section could do with a bit of work. Removing the unconditional one above your change and combining with the actual outcome messages would be my suggestion. We really don't need multiple log lines as we have now, nor would printing the chunk information across both lines be useful.

Currently we log not just "no where to put it..." but information about the chunk and that it isn't on the correctly tagged shard:

chunk {....} is not on a shard with the right tag:  <tag>
no where to put it 

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