)]}'
{"cmd/cbft/init_serverless_test.go":[{"author":{"_account_id":1004804,"name":"Thejas-bhat","email":"thejas.orkombu@couchbase.com","username":"Thejas-bhat","avatars":[{"url":"https://www.gravatar.com/avatar/287cbc76d9eb75d794779bc8ce9efb8b.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/287cbc76d9eb75d794779bc8ce9efb8b.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/287cbc76d9eb75d794779bc8ce9efb8b.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/287cbc76d9eb75d794779bc8ce9efb8b.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d120","height":120}]},"change_message_id":"2757d44ca49d7863584fc60dea37528dfd923da7","unresolved":true,"context_lines":[{"line_number":226,"context_line":"\t}"},{"line_number":227,"context_line":"}"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"func Test_serverlessRebalanceHook_removeNode(t *testing.T) {"},{"line_number":230,"context_line":"\tprevCanNodeAccommodateRequest :\u003d cbft.CanNodeAccommodateRequest"},{"line_number":231,"context_line":"\tcbft.CanNodeAccommodateRequest \u003d func(nodeDef *cbgt.NodeDef) bool {"},{"line_number":232,"context_line":"\t\treturn true"}],"source_content_type":"text/x-go","patch_set":2,"id":"9be2ff74_871ef121","line":229,"updated":"2022-10-10 10:33:57.000000000","message":"Perhaps we can keep all the test names to camel casing.","commit_id":"3a8ad632ebb04da48021a60834dbdd6e2e442377"},{"author":{"_account_id":1000338,"name":"Abhi Dangeti","email":"abhinav@couchbase.com","username":"abhinavdangeti","avatars":[{"url":"https://www.gravatar.com/avatar/9007099855b1bf7d96e9c1a10bc9542e.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/9007099855b1bf7d96e9c1a10bc9542e.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/9007099855b1bf7d96e9c1a10bc9542e.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/9007099855b1bf7d96e9c1a10bc9542e.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d120","height":120}]},"change_message_id":"3e5a2c6614c4de08912aea40366b8987ac6bd1b8","unresolved":true,"context_lines":[{"line_number":226,"context_line":"\t}"},{"line_number":227,"context_line":"}"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"func Test_serverlessRebalanceHook_removeNode(t *testing.T) {"},{"line_number":230,"context_line":"\tprevCanNodeAccommodateRequest :\u003d cbft.CanNodeAccommodateRequest"},{"line_number":231,"context_line":"\tcbft.CanNodeAccommodateRequest \u003d func(nodeDef *cbgt.NodeDef) bool {"},{"line_number":232,"context_line":"\t\treturn true"}],"source_content_type":"text/x-go","patch_set":2,"id":"6ce3e4b6_a1dd0ecc","line":229,"in_reply_to":"9be2ff74_871ef121","updated":"2022-10-10 13:59:46.000000000","message":"Did this for grep-ability.","commit_id":"3a8ad632ebb04da48021a60834dbdd6e2e442377"},{"author":{"_account_id":1004804,"name":"Thejas-bhat","email":"thejas.orkombu@couchbase.com","username":"Thejas-bhat","avatars":[{"url":"https://www.gravatar.com/avatar/287cbc76d9eb75d794779bc8ce9efb8b.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/287cbc76d9eb75d794779bc8ce9efb8b.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/287cbc76d9eb75d794779bc8ce9efb8b.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/287cbc76d9eb75d794779bc8ce9efb8b.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d120","height":120}]},"change_message_id":"2757d44ca49d7863584fc60dea37528dfd923da7","unresolved":true,"context_lines":[{"line_number":242,"context_line":""},{"line_number":243,"context_line":"\tinput :\u003d rebalance.RebalanceHookInfo{"},{"line_number":244,"context_line":"\t\tBegNodeDefs: \u0026cbgt.NodeDefs{"},{"line_number":245,"context_line":"\t\t\tNodeDefs: map[string]*cbgt.NodeDef{"},{"line_number":246,"context_line":"\t\t\t\t\"n_0\": \u0026cbgt.NodeDef{"},{"line_number":247,"context_line":"\t\t\t\t\tUUID:      \"n_0\","},{"line_number":248,"context_line":"\t\t\t\t\tContainer: \"group1\","}],"source_content_type":"text/x-go","patch_set":2,"id":"809a479d_f0020cf5","line":245,"updated":"2022-10-10 10:33:57.000000000","message":"I\u0027m just wondering of a situation like this:\n\nWhile rebalancing the pindex on n_3, suppose there were multiple candidate nodes with same the high weight 2, both of them belonging to different server groups (say group 2 and group 3), would the rebalance operation move the pindex resident on n_3 to group 2, since I\u0027m guessing moving across groups would be costlier than within the group. \n\nSo, my question is, if a scenario like this is implemented (if it makes sense), can we add a UT for the same? I realise that the serverless rebalance and planner hooks just adjust the nodeweights, so I\u0027m not entirely sure how to test which candidate node would be chosen (is it perhaps decided at the blance level?) for the moving out pindex\u0027s residence.","commit_id":"3a8ad632ebb04da48021a60834dbdd6e2e442377"},{"author":{"_account_id":1004804,"name":"Thejas-bhat","email":"thejas.orkombu@couchbase.com","username":"Thejas-bhat","avatars":[{"url":"https://www.gravatar.com/avatar/287cbc76d9eb75d794779bc8ce9efb8b.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/287cbc76d9eb75d794779bc8ce9efb8b.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/287cbc76d9eb75d794779bc8ce9efb8b.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/287cbc76d9eb75d794779bc8ce9efb8b.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d120","height":120}]},"change_message_id":"9be006fe98cb709bdab4e09ee56aaa8847db2fa0","unresolved":false,"context_lines":[{"line_number":242,"context_line":""},{"line_number":243,"context_line":"\tinput :\u003d rebalance.RebalanceHookInfo{"},{"line_number":244,"context_line":"\t\tBegNodeDefs: \u0026cbgt.NodeDefs{"},{"line_number":245,"context_line":"\t\t\tNodeDefs: map[string]*cbgt.NodeDef{"},{"line_number":246,"context_line":"\t\t\t\t\"n_0\": \u0026cbgt.NodeDef{"},{"line_number":247,"context_line":"\t\t\t\t\tUUID:      \"n_0\","},{"line_number":248,"context_line":"\t\t\t\t\tContainer: \"group1\","}],"source_content_type":"text/x-go","patch_set":2,"id":"6af0fbe7_ce1e5857","line":245,"in_reply_to":"5e63d65e_da347d34","updated":"2022-10-11 06:03:11.000000000","message":"Ack","commit_id":"3a8ad632ebb04da48021a60834dbdd6e2e442377"},{"author":{"_account_id":1000338,"name":"Abhi Dangeti","email":"abhinav@couchbase.com","username":"abhinavdangeti","avatars":[{"url":"https://www.gravatar.com/avatar/9007099855b1bf7d96e9c1a10bc9542e.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/9007099855b1bf7d96e9c1a10bc9542e.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/9007099855b1bf7d96e9c1a10bc9542e.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/9007099855b1bf7d96e9c1a10bc9542e.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d120","height":120}]},"change_message_id":"3e5a2c6614c4de08912aea40366b8987ac6bd1b8","unresolved":true,"context_lines":[{"line_number":242,"context_line":""},{"line_number":243,"context_line":"\tinput :\u003d rebalance.RebalanceHookInfo{"},{"line_number":244,"context_line":"\t\tBegNodeDefs: \u0026cbgt.NodeDefs{"},{"line_number":245,"context_line":"\t\t\tNodeDefs: map[string]*cbgt.NodeDef{"},{"line_number":246,"context_line":"\t\t\t\t\"n_0\": \u0026cbgt.NodeDef{"},{"line_number":247,"context_line":"\t\t\t\t\tUUID:      \"n_0\","},{"line_number":248,"context_line":"\t\t\t\t\tContainer: \"group1\","}],"source_content_type":"text/x-go","patch_set":2,"id":"5e63d65e_da347d34","line":245,"in_reply_to":"809a479d_f0020cf5","updated":"2022-10-10 13:59:46.000000000","message":"Correct, this is decided in blance and is out of scope for these unit tests here. blance does take into account server groups information to move the pindex accordingly.\n\n\u003e While rebalancing the pindex on n_3, suppose there were multiple candidate nodes with same the high weight 2, both of them belonging to different server groups (say group 2 and group 3), would the rebalance operation move the pindex resident on n_3 to group 2, since I\u0027m guessing moving across groups would be costlier than within the group\n\nThere\u0027re some inconsistencies in your comment above - there\u0027s only group 1 and group 2 in this test. Since n_3 is being removed, and the only partition absorbing the same source is on n_2, n_2\u0027s node weight is set highest and given to blance. Blance then does some checks -\n\n   - n_2 is where the active is resident, so it\u0027s not considered.\n   - n_1 is part of the server group where the active is resident, so it\u0027s not considered.\n   - n_1 becomes the new residence of the partition on n_3.","commit_id":"3a8ad632ebb04da48021a60834dbdd6e2e442377"}]}
