)]}'
{"trove/common/strategies/cluster/experimental/mongodb/api.py":[{"author":{"_account_id":22608,"name":"zhanggang","email":"zhanggang@cmss.chinamobile.com","username":"zhanggang"},"change_message_id":"d4d2f99921be009d056c2d3bfbea20664c57e68d","unresolved":false,"context_lines":[{"line_number":152,"context_line":"                                        configuration_id\u003dNone,"},{"line_number":153,"context_line":"                                        cluster_config\u003dconfigsvr_config,"},{"line_number":154,"context_line":"                                        locality\u003dlocality,"},{"line_number":155,"context_line":"                                        region_name\u003dregions[i])"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"        for i in range(1, num_mongos + 1):"},{"line_number":158,"context_line":"            instance_name \u003d \"%s-%s-%s\" % (name, \"mongos\", str(i))"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f4b6375_67ea6574","side":"PARENT","line":155,"range":{"start_line":155,"start_character":39,"end_line":155,"end_character":62},"updated":"2017-11-07 08:11:02.000000000","message":"how about remove this line, and let Instance.create use the default  CONF.os_region_name","commit_id":"efd2ad9ee922c800e959c09c1061552d9307e61f"},{"author":{"_account_id":13562,"name":"Samuel Matzek","email":"smatzek@us.ibm.com","username":"smatzek"},"change_message_id":"9076bc539cd6243ad98ffd4a220a3af2a50de5da","unresolved":false,"context_lines":[{"line_number":152,"context_line":"                                        configuration_id\u003dNone,"},{"line_number":153,"context_line":"                                        cluster_config\u003dconfigsvr_config,"},{"line_number":154,"context_line":"                                        locality\u003dlocality,"},{"line_number":155,"context_line":"                                        region_name\u003dregions[i])"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"        for i in range(1, num_mongos + 1):"},{"line_number":158,"context_line":"            instance_name \u003d \"%s-%s-%s\" % (name, \"mongos\", str(i))"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f4b6375_d8631ddd","side":"PARENT","line":155,"range":{"start_line":155,"start_character":39,"end_line":155,"end_character":62},"in_reply_to":"3f4b6375_67ea6574","updated":"2017-11-08 12:45:59.000000000","message":"As the code is now it will put a config server and query router in the regions with the instances, which is probably nice.  We could leave this and put the check in I suggested earlier.","commit_id":"efd2ad9ee922c800e959c09c1061552d9307e61f"},{"author":{"_account_id":22608,"name":"zhanggang","email":"zhanggang@cmss.chinamobile.com","username":"zhanggang"},"change_message_id":"7596b80c29dd4f76a2e9fbdd6fa1fa92ef033b3a","unresolved":false,"context_lines":[{"line_number":152,"context_line":"                                        configuration_id\u003dNone,"},{"line_number":153,"context_line":"                                        cluster_config\u003dconfigsvr_config,"},{"line_number":154,"context_line":"                                        locality\u003dlocality,"},{"line_number":155,"context_line":"                                        region_name\u003dregions[i])"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"        for i in range(1, num_mongos + 1):"},{"line_number":158,"context_line":"            instance_name \u003d \"%s-%s-%s\" % (name, \"mongos\", str(i))"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f4b6375_d3777e3b","side":"PARENT","line":155,"range":{"start_line":155,"start_character":39,"end_line":155,"end_character":62},"in_reply_to":"3f4b6375_d8631ddd","updated":"2017-11-08 13:50:16.000000000","message":"hi,I just come up with an idea, we can use the modulus operator(regions[i % num_instances]instead of regions[i]). With this change users can set up any number of config server/query router and prevent the index out of range error.","commit_id":"efd2ad9ee922c800e959c09c1061552d9307e61f"},{"author":{"_account_id":22608,"name":"zhanggang","email":"zhanggang@cmss.chinamobile.com","username":"zhanggang"},"change_message_id":"d4d2f99921be009d056c2d3bfbea20664c57e68d","unresolved":false,"context_lines":[{"line_number":167,"context_line":"                                        configuration_id\u003dNone,"},{"line_number":168,"context_line":"                                        cluster_config\u003dmongos_config,"},{"line_number":169,"context_line":"                                        locality\u003dlocality,"},{"line_number":170,"context_line":"                                        region_name\u003dregions[i])"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"        task_api.load(context, datastore_version.manager).create_cluster("},{"line_number":173,"context_line":"            db_info.id)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f4b6375_2700ed33","side":"PARENT","line":170,"range":{"start_line":170,"start_character":40,"end_line":170,"end_character":62},"updated":"2017-11-07 08:11:02.000000000","message":"And remove this line too.","commit_id":"efd2ad9ee922c800e959c09c1061552d9307e61f"},{"author":{"_account_id":13562,"name":"Samuel Matzek","email":"smatzek@us.ibm.com","username":"smatzek"},"change_message_id":"9076bc539cd6243ad98ffd4a220a3af2a50de5da","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        # TODO(amcreynolds): or introduce a min/max num_instances and set"},{"line_number":69,"context_line":"        # TODO(amcreynolds): both to 3"},{"line_number":70,"context_line":"        num_instances \u003d len(instances)"},{"line_number":71,"context_line":"        if num_instances !\u003d 3:"},{"line_number":72,"context_line":"            raise exception.ClusterNumInstancesNotSupported(num_instances\u003d3)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        mongo_conf \u003d CONF.get(datastore_version.manager)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f4b6375_d891dd9c","line":71,"range":{"start_line":71,"start_character":8,"end_line":71,"end_character":30},"updated":"2017-11-08 12:45:59.000000000","message":"Since the number of instances is capped at 3, hard coded in the code, I would suggest putting additional checks to force num_configsvr and num_mongos to be \u003c\u003d 3.  This would prevent the additional index out of range errors.\nIn addition, add tests that test setting those num_ conf values higher than 3.","commit_id":"dbfc77a355fdd1400191e42d3a00afaec2fe39d8"}]}
