[SERVER-44818] Change the balancerCollectionStatus command response format Created: 25/Nov/19  Updated: 29/Oct/23  Resolved: 26/Nov/19

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

Type: Task Priority: Major - P3
Reporter: Marcos José Grillo Ramirez Assignee: Marcos José Grillo Ramirez
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
Backwards Compatibility: Fully Compatible
Sprint: Sharding 2019-12-02
Participants:

 Description   

The current command response format is:

 

 

{
    status: balanced|draining|zoneViolation|chunksImbalance
}

 

However, the balanced response might be confusing because an user could've configured a big number of chunks in a zone regardless of the number of shards in that zone, and this would show an uneven distribution of chunks on the cluster, which is completely valid and does not require any action on the part of the balancer.

A better approach would be to add a boolean that indicates the fulfillment of the balancer policies, so there is no action required from the balancer:

 

{
    balancerCompliant: true|false,
    firstComplianceViolation: draining|zoneViolation|chunksImbalance // only if balancerCompliant is false
}

 



 Comments   
Comment by Githook User [ 26/Nov/19 ]

Author:

{'name': 'Marcos José Grillo Ramírez', 'email': 'marcos.grillo@10gen.com'}

Message: SERVER-44818 Change the balancerCollectionStatus command response format
Branch: master
https://github.com/mongodb/mongo/commit/2b70f6f0d7cf33dd387b50141992362fc4e2fcf8

Generated at Thu Feb 08 05:07:04 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.