Description of problem: ========================= Currently when an admin knows that a specific brick hosts the right information or is the better choice amongst the replica pairs when the files are in split-brain, the admin can resolve them based on mentioning the right brick for a specific file as below [root@dhcp35-196 ~]# gluster v heal afr2 asds Usage: volume heal <VOLNAME> [enable | disable | full |statistics [heal-count [replica <HOSTNAME:BRICKNAME>]] |info [healed | heal-failed | split-brain] |split-brain {bigger-file <FILE> | latest-mtime <FILE> |source-brick <HOSTNAME:BRICKNAME> [<FILE>]} |granular-entry-heal {enable | disable}] To help the admin with easier and automated way of resolving split brain, we are now providing an option "cluster.favorite-child-policy" to which either of the below values can be set "possible options are none, size, ctime, mtime, majority." With that all the files in a replica pair can be resolved automatically. But, we are missing a good option choice of having brick choice in this automated manner. This would be useful when the admin knows that there are splitbrains due to clients seeing network partition, but the admin knows which is the better copy in general. In that case mtime or ctime or size may not always be the best choice. Instead brick choice would be the better. Hence implement brick also as a choice for admin to select for setting "fav child policy" Yes, this can be a little more complicated, given that in a distrep volume, the brick must be mentioned for each replica pair . But it would be good to have to make this a more complete feature. test version: ===== 3.8.4-11 Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
can even be reproduced with client side heal,create a metasplitbrian and access the file from a healthy client, this will heal, inspite of same size on both bricks
The source-brick option with fav-child-policy, will make sense only if the volumes are of type plain replicate. In case of dist-rep volumes, the brick which is set as the source for healing will belong to only one subvolume and will not heal files in split brains in other subvolumes. Since this will not be appropriate in all the cases, there is no plan to implemented this feature with priority. Closing this as WONTFIX.