)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1004341,"name":"Ben Huddleston","email":"ben.huddleston@couchbase.com","username":"BenHuddleston","avatars":[{"url":"https://www.gravatar.com/avatar/ccb3e7e3b52c3d14e759d1b4c0507a3b.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/ccb3e7e3b52c3d14e759d1b4c0507a3b.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/ccb3e7e3b52c3d14e759d1b4c0507a3b.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/ccb3e7e3b52c3d14e759d1b4c0507a3b.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d120","height":120}]},"change_message_id":"7606b8c1e4db186b809dc15629e587aad6f065c6","unresolved":true,"context_lines":[{"line_number":10,"context_line":"uploaders already allocated on node which hit the allowance"},{"line_number":11,"context_line":"limit."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"So now the algorithm works as such:"},{"line_number":14,"context_line":"1. Sort the candidates so the candidates with less choice are"},{"line_number":15,"context_line":"   processed earlier"},{"line_number":16,"context_line":"2. Move through the sorted list of vbuckets and out of the array"},{"line_number":17,"context_line":"   of candidates for vbucket choose the one with lesser usage."},{"line_number":18,"context_line":"   After the choice is made, increment the usage for the chosen node."},{"line_number":19,"context_line":"3. If the node with less usage still had reached the allowance, traverse"},{"line_number":20,"context_line":"   the list of vbuckets from the beginning, reconsidering earlier made"},{"line_number":21,"context_line":"   choices with the node of interest being excluded."},{"line_number":22,"context_line":"4. If some choice had changed, adjust the nodes usage accordingly"},{"line_number":23,"context_line":"   and return at the position in the list where uploader is"},{"line_number":24,"context_line":"   still not chosen. (back to #2)"},{"line_number":25,"context_line":"5. If it is not possible to free the usage for a node with least"},{"line_number":26,"context_line":"   usage, allow the node still to be chosen as an uploader"},{"line_number":27,"context_line":"   exceeding the allowance, thus resulting in unbalanced map."},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"Change-Id: Ie4d1ecd3ce595651423fd53dadfef15056791915"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"f873fe27_5be21aed","line":27,"range":{"start_line":13,"start_character":0,"end_line":27,"end_character":61},"updated":"2026-01-05 10:45:02.000000000","message":"Are there any pathologically bad cases here in which this takes a long time as we reconsider candidates? I.e. if we have a very low upload limit (possible if we have many nodes?) and we also find that we have few candidates that have reached their allowance (would a large scale up cause this?)?","commit_id":"d3175d1d84e3aa795e9a5a07834ee2b0e4d30b3a"},{"author":{"_account_id":1004341,"name":"Ben Huddleston","email":"ben.huddleston@couchbase.com","username":"BenHuddleston","avatars":[{"url":"https://www.gravatar.com/avatar/ccb3e7e3b52c3d14e759d1b4c0507a3b.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/ccb3e7e3b52c3d14e759d1b4c0507a3b.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/ccb3e7e3b52c3d14e759d1b4c0507a3b.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/ccb3e7e3b52c3d14e759d1b4c0507a3b.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d120","height":120}]},"change_message_id":"7606b8c1e4db186b809dc15629e587aad6f065c6","unresolved":true,"context_lines":[{"line_number":11,"context_line":"limit."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"So now the algorithm works as such:"},{"line_number":14,"context_line":"1. Sort the candidates so the candidates with less choice are"},{"line_number":15,"context_line":"   processed earlier"},{"line_number":16,"context_line":"2. Move through the sorted list of vbuckets and out of the array"},{"line_number":17,"context_line":"   of candidates for vbucket choose the one with lesser usage."},{"line_number":18,"context_line":"   After the choice is made, increment the usage for the chosen node."},{"line_number":19,"context_line":"3. If the node with less usage still had reached the allowance, traverse"},{"line_number":20,"context_line":"   the list of vbuckets from the beginning, reconsidering earlier made"},{"line_number":21,"context_line":"   choices with the node of interest being excluded."},{"line_number":22,"context_line":"4. If some choice had changed, adjust the nodes usage accordingly"},{"line_number":23,"context_line":"   and return at the position in the list where uploader is"},{"line_number":24,"context_line":"   still not chosen. (back to #2)"},{"line_number":25,"context_line":"5. If it is not possible to free the usage for a node with least"},{"line_number":26,"context_line":"   usage, allow the node still to be chosen as an uploader"},{"line_number":27,"context_line":"   exceeding the allowance, thus resulting in unbalanced map."},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"Change-Id: Ie4d1ecd3ce595651423fd53dadfef15056791915"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"e3c7a306_42583a15","line":27,"range":{"start_line":14,"start_character":0,"end_line":27,"end_character":61},"updated":"2026-01-05 10:45:02.000000000","message":"Please can you copy this summary of the algorithm into the code such that someone can see at a glance what the intended behaviour is?","commit_id":"d3175d1d84e3aa795e9a5a07834ee2b0e4d30b3a"},{"author":{"_account_id":1000487,"name":"Artem Stemkovski","email":"artem@couchbase.com","username":"astemkov","avatars":[{"url":"https://www.gravatar.com/avatar/ffda974c541ff0ee49718fd83bec668f.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/ffda974c541ff0ee49718fd83bec668f.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/ffda974c541ff0ee49718fd83bec668f.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/ffda974c541ff0ee49718fd83bec668f.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d120","height":120}]},"change_message_id":"382238174d701bc270f7dc0212207efd4f9ea4f7","unresolved":false,"context_lines":[{"line_number":11,"context_line":"limit."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"So now the algorithm works as such:"},{"line_number":14,"context_line":"1. Sort the candidates so the candidates with less choice are"},{"line_number":15,"context_line":"   processed earlier"},{"line_number":16,"context_line":"2. Move through the sorted list of vbuckets and out of the array"},{"line_number":17,"context_line":"   of candidates for vbucket choose the one with lesser usage."},{"line_number":18,"context_line":"   After the choice is made, increment the usage for the chosen node."},{"line_number":19,"context_line":"3. If the node with less usage still had reached the allowance, traverse"},{"line_number":20,"context_line":"   the list of vbuckets from the beginning, reconsidering earlier made"},{"line_number":21,"context_line":"   choices with the node of interest being excluded."},{"line_number":22,"context_line":"4. If some choice had changed, adjust the nodes usage accordingly"},{"line_number":23,"context_line":"   and return at the position in the list where uploader is"},{"line_number":24,"context_line":"   still not chosen. (back to #2)"},{"line_number":25,"context_line":"5. If it is not possible to free the usage for a node with least"},{"line_number":26,"context_line":"   usage, allow the node still to be chosen as an uploader"},{"line_number":27,"context_line":"   exceeding the allowance, thus resulting in unbalanced map."},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"Change-Id: Ie4d1ecd3ce595651423fd53dadfef15056791915"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"3c49b26e_324249ce","line":27,"range":{"start_line":14,"start_character":0,"end_line":27,"end_character":61},"in_reply_to":"e3c7a306_42583a15","updated":"2026-01-21 09:58:29.000000000","message":"We always used to rely on git blame for that purpose, but ok.","commit_id":"d3175d1d84e3aa795e9a5a07834ee2b0e4d30b3a"},{"author":{"_account_id":1000487,"name":"Artem Stemkovski","email":"artem@couchbase.com","username":"astemkov","avatars":[{"url":"https://www.gravatar.com/avatar/ffda974c541ff0ee49718fd83bec668f.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/ffda974c541ff0ee49718fd83bec668f.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/ffda974c541ff0ee49718fd83bec668f.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/ffda974c541ff0ee49718fd83bec668f.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d120","height":120}]},"change_message_id":"382238174d701bc270f7dc0212207efd4f9ea4f7","unresolved":false,"context_lines":[{"line_number":10,"context_line":"uploaders already allocated on node which hit the allowance"},{"line_number":11,"context_line":"limit."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"So now the algorithm works as such:"},{"line_number":14,"context_line":"1. Sort the candidates so the candidates with less choice are"},{"line_number":15,"context_line":"   processed earlier"},{"line_number":16,"context_line":"2. Move through the sorted list of vbuckets and out of the array"},{"line_number":17,"context_line":"   of candidates for vbucket choose the one with lesser usage."},{"line_number":18,"context_line":"   After the choice is made, increment the usage for the chosen node."},{"line_number":19,"context_line":"3. If the node with less usage still had reached the allowance, traverse"},{"line_number":20,"context_line":"   the list of vbuckets from the beginning, reconsidering earlier made"},{"line_number":21,"context_line":"   choices with the node of interest being excluded."},{"line_number":22,"context_line":"4. If some choice had changed, adjust the nodes usage accordingly"},{"line_number":23,"context_line":"   and return at the position in the list where uploader is"},{"line_number":24,"context_line":"   still not chosen. (back to #2)"},{"line_number":25,"context_line":"5. If it is not possible to free the usage for a node with least"},{"line_number":26,"context_line":"   usage, allow the node still to be chosen as an uploader"},{"line_number":27,"context_line":"   exceeding the allowance, thus resulting in unbalanced map."},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"Change-Id: Ie4d1ecd3ce595651423fd53dadfef15056791915"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"7c1a4832_182c75e2","line":27,"range":{"start_line":13,"start_character":0,"end_line":27,"end_character":61},"in_reply_to":"f873fe27_5be21aed","updated":"2026-01-21 09:58:29.000000000","message":"It is possible that we can have multiple passes through the whole list, but I don\u0027t think that it can ever be a performance issue. Calculations here are fast enough and number of passes is finite.","commit_id":"d3175d1d84e3aa795e9a5a07834ee2b0e4d30b3a"},{"author":{"_account_id":1004341,"name":"Ben Huddleston","email":"ben.huddleston@couchbase.com","username":"BenHuddleston","avatars":[{"url":"https://www.gravatar.com/avatar/ccb3e7e3b52c3d14e759d1b4c0507a3b.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/ccb3e7e3b52c3d14e759d1b4c0507a3b.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/ccb3e7e3b52c3d14e759d1b4c0507a3b.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/ccb3e7e3b52c3d14e759d1b4c0507a3b.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d120","height":120}]},"change_message_id":"7606b8c1e4db186b809dc15629e587aad6f065c6","unresolved":true,"context_lines":[{"line_number":25,"context_line":"5. If it is not possible to free the usage for a node with least"},{"line_number":26,"context_line":"   usage, allow the node still to be chosen as an uploader"},{"line_number":27,"context_line":"   exceeding the allowance, thus resulting in unbalanced map."},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"Change-Id: Ie4d1ecd3ce595651423fd53dadfef15056791915"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"a93d5b6e_b4c889b5","line":28,"updated":"2026-01-05 10:45:02.000000000","message":"Please can you add some of the justification from the MB to the commit message?\n\nI.e. we are making this change to reduce uploading from scratch.","commit_id":"d3175d1d84e3aa795e9a5a07834ee2b0e4d30b3a"},{"author":{"_account_id":1000487,"name":"Artem Stemkovski","email":"artem@couchbase.com","username":"astemkov","avatars":[{"url":"https://www.gravatar.com/avatar/ffda974c541ff0ee49718fd83bec668f.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/ffda974c541ff0ee49718fd83bec668f.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/ffda974c541ff0ee49718fd83bec668f.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/ffda974c541ff0ee49718fd83bec668f.jpg?d\u003didenticon\u0026r\u003dpg\u0026s\u003d120","height":120}]},"change_message_id":"382238174d701bc270f7dc0212207efd4f9ea4f7","unresolved":false,"context_lines":[{"line_number":25,"context_line":"5. If it is not possible to free the usage for a node with least"},{"line_number":26,"context_line":"   usage, allow the node still to be chosen as an uploader"},{"line_number":27,"context_line":"   exceeding the allowance, thus resulting in unbalanced map."},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"Change-Id: Ie4d1ecd3ce595651423fd53dadfef15056791915"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"09c9c8b1_a72c023f","line":28,"in_reply_to":"a93d5b6e_b4c889b5","updated":"2026-01-21 09:58:29.000000000","message":"Done","commit_id":"d3175d1d84e3aa795e9a5a07834ee2b0e4d30b3a"}]}
