)]}'
{"trove/common/strategies/cluster/experimental/cassandra/taskmanager.py":[{"author":{"_account_id":28695,"name":"Bartosz Zurkowski","email":"b.zurkowski@samsung.com","username":"b.zurkowski"},"change_message_id":"a1a9ca16c6671e73449216f0f6a6f6536679a216","unresolved":false,"context_lines":[{"line_number":353,"context_line":"    def upgrade_cluster(self, context, cluster_id, datastore_version):"},{"line_number":354,"context_line":"        def ordering_function(instance):"},{"line_number":355,"context_line":"            cluster_node_ids \u003d self.find_cluster_node_ids(cluster_id)"},{"line_number":356,"context_line":"            cluster_nodes \u003d self.load_cluster_nodes(context, cluster_node_ids)"},{"line_number":357,"context_line":"            seeds \u003d cluster_nodes[0][\u0027guest\u0027].get_seeds()"},{"line_number":358,"context_line":"            if self.get_ip(instance) in seeds:"},{"line_number":359,"context_line":"                return -1"}],"source_content_type":"text/x-python","patch_set":6,"id":"ffb9cba7_32af8de4","line":356,"range":{"start_line":356,"start_character":12,"end_line":356,"end_character":25},"updated":"2019-04-24 14:04:29.000000000","message":"Put more attention to analyzing the neighbour code. There are already lines that implement similar logic, e.g. [1]. Try to align with it - introduce same naming, use same statement ordering etc. In this case, you could reuse code from shrink and grow tasks and apply names such as \"test_node\" or \"current_seeds\". Also, it\u0027s a good candidate for moving into a separate method.\n\n[1] https://github.com/openstack/trove/blob/master/trove/common/strategies/cluster/experimental/cassandra/taskmanager.py#L284-L288","commit_id":"7d88c358c41a7b030e170c6ee49d414021900fe9"},{"author":{"_account_id":29995,"name":"Kasper Hasior","email":"k.hasior@partner.samsung.com","username":"k.hasior"},"change_message_id":"3430bce3141d92b29c5b563a87dc507ac7cc0eb1","unresolved":false,"context_lines":[{"line_number":353,"context_line":"    def upgrade_cluster(self, context, cluster_id, datastore_version):"},{"line_number":354,"context_line":"        def ordering_function(instance):"},{"line_number":355,"context_line":"            cluster_node_ids \u003d self.find_cluster_node_ids(cluster_id)"},{"line_number":356,"context_line":"            cluster_nodes \u003d self.load_cluster_nodes(context, cluster_node_ids)"},{"line_number":357,"context_line":"            seeds \u003d cluster_nodes[0][\u0027guest\u0027].get_seeds()"},{"line_number":358,"context_line":"            if self.get_ip(instance) in seeds:"},{"line_number":359,"context_line":"                return -1"}],"source_content_type":"text/x-python","patch_set":6,"id":"ffb9cba7_db163ef2","line":356,"range":{"start_line":356,"start_character":12,"end_line":356,"end_character":25},"in_reply_to":"ffb9cba7_32af8de4","updated":"2019-04-25 11:52:38.000000000","message":"I have fixed naming and moved retrievieng current seeds to a separated function.","commit_id":"7d88c358c41a7b030e170c6ee49d414021900fe9"},{"author":{"_account_id":28695,"name":"Bartosz Zurkowski","email":"b.zurkowski@samsung.com","username":"b.zurkowski"},"change_message_id":"a1a9ca16c6671e73449216f0f6a6f6536679a216","unresolved":false,"context_lines":[{"line_number":351,"context_line":"            context, cluster_id, delay_sec\u003dCONF.cassandra.node_sync_time)"},{"line_number":352,"context_line":""},{"line_number":353,"context_line":"    def upgrade_cluster(self, context, cluster_id, datastore_version):"},{"line_number":354,"context_line":"        def ordering_function(instance):"},{"line_number":355,"context_line":"            cluster_node_ids \u003d self.find_cluster_node_ids(cluster_id)"},{"line_number":356,"context_line":"            cluster_nodes \u003d self.load_cluster_nodes(context, cluster_node_ids)"},{"line_number":357,"context_line":"            seeds \u003d cluster_nodes[0][\u0027guest\u0027].get_seeds()"},{"line_number":358,"context_line":"            if self.get_ip(instance) in seeds:"},{"line_number":359,"context_line":"                return -1"},{"line_number":360,"context_line":"            return 0"}],"source_content_type":"text/x-python","patch_set":6,"id":"ffb9cba7_7209852a","line":357,"range":{"start_line":354,"start_character":0,"end_line":357,"end_character":57},"updated":"2019-04-24 14:04:29.000000000","message":"The ordering function is going to be called for each cluster instance. Do we really want to fetch all cluster nodes from the DB eachtime?\n\nLet\u0027s fetch cluster nodes just before the nested ordering function.","commit_id":"7d88c358c41a7b030e170c6ee49d414021900fe9"},{"author":{"_account_id":29995,"name":"Kasper Hasior","email":"k.hasior@partner.samsung.com","username":"k.hasior"},"change_message_id":"3430bce3141d92b29c5b563a87dc507ac7cc0eb1","unresolved":false,"context_lines":[{"line_number":351,"context_line":"            context, cluster_id, delay_sec\u003dCONF.cassandra.node_sync_time)"},{"line_number":352,"context_line":""},{"line_number":353,"context_line":"    def upgrade_cluster(self, context, cluster_id, datastore_version):"},{"line_number":354,"context_line":"        def ordering_function(instance):"},{"line_number":355,"context_line":"            cluster_node_ids \u003d self.find_cluster_node_ids(cluster_id)"},{"line_number":356,"context_line":"            cluster_nodes \u003d self.load_cluster_nodes(context, cluster_node_ids)"},{"line_number":357,"context_line":"            seeds \u003d cluster_nodes[0][\u0027guest\u0027].get_seeds()"},{"line_number":358,"context_line":"            if self.get_ip(instance) in seeds:"},{"line_number":359,"context_line":"                return -1"},{"line_number":360,"context_line":"            return 0"}],"source_content_type":"text/x-python","patch_set":6,"id":"ffb9cba7_9bd68627","line":357,"range":{"start_line":354,"start_character":0,"end_line":357,"end_character":57},"in_reply_to":"ffb9cba7_7209852a","updated":"2019-04-25 11:52:38.000000000","message":"Done","commit_id":"7d88c358c41a7b030e170c6ee49d414021900fe9"}],"trove/guestagent/datastore/experimental/cassandra/manager.py":[{"author":{"_account_id":28695,"name":"Bartosz Zurkowski","email":"b.zurkowski@samsung.com","username":"b.zurkowski"},"change_message_id":"40eeb8cae1880087d15edc566c34803e9af11133","unresolved":false,"context_lines":[{"line_number":183,"context_line":"    def pre_upgrade(self, context):"},{"line_number":184,"context_line":"        data_dir \u003d self.app.cassandra_data_dir"},{"line_number":185,"context_line":"        mount_point, _data \u003d os.path.split(data_dir)"},{"line_number":186,"context_line":"        save_etc_dir \u003d \"%s%s\" % (mount_point, self.app.cassandra_conf_dir)"},{"line_number":187,"context_line":"        home_save \u003d \"%s/trove_user\" % mount_point"},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"        self.app.status.begin_restart()"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fce034c_6fe6b0eb","line":186,"range":{"start_line":186,"start_character":24,"end_line":186,"end_character":28},"updated":"2019-04-12 08:24:24.000000000","message":"Let\u0027s be consistent with MySQL strategy and use \"%s/etc\" pattern instead.","commit_id":"64ddb554fd890ca2afd0757d11bbc8fa2fac829c"},{"author":{"_account_id":29995,"name":"Kasper Hasior","email":"k.hasior@partner.samsung.com","username":"k.hasior"},"change_message_id":"741aaf4c14ba4731ef831a226bdde7c9ece6a282","unresolved":false,"context_lines":[{"line_number":183,"context_line":"    def pre_upgrade(self, context):"},{"line_number":184,"context_line":"        data_dir \u003d self.app.cassandra_data_dir"},{"line_number":185,"context_line":"        mount_point, _data \u003d os.path.split(data_dir)"},{"line_number":186,"context_line":"        save_etc_dir \u003d \"%s%s\" % (mount_point, self.app.cassandra_conf_dir)"},{"line_number":187,"context_line":"        home_save \u003d \"%s/trove_user\" % mount_point"},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"        self.app.status.begin_restart()"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fce034c_7695ebe3","line":186,"range":{"start_line":186,"start_character":24,"end_line":186,"end_character":28},"in_reply_to":"3fce034c_6fe6b0eb","updated":"2019-04-17 09:02:31.000000000","message":"Done","commit_id":"64ddb554fd890ca2afd0757d11bbc8fa2fac829c"},{"author":{"_account_id":28695,"name":"Bartosz Zurkowski","email":"b.zurkowski@samsung.com","username":"b.zurkowski"},"change_message_id":"40eeb8cae1880087d15edc566c34803e9af11133","unresolved":false,"context_lines":[{"line_number":187,"context_line":"        home_save \u003d \"%s/trove_user\" % mount_point"},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"        self.app.status.begin_restart()"},{"line_number":190,"context_line":"        self.app.drain()"},{"line_number":191,"context_line":"        self.app.stop_db()"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"        if not operating_system.exists(save_etc_dir):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fce034c_aab7a6d8","line":190,"updated":"2019-04-12 08:24:24.000000000","message":"Why do we need to drain before shutdown? Isn\u0027t graceful shutdown sufficient?","commit_id":"64ddb554fd890ca2afd0757d11bbc8fa2fac829c"},{"author":{"_account_id":29995,"name":"Kasper Hasior","email":"k.hasior@partner.samsung.com","username":"k.hasior"},"change_message_id":"741aaf4c14ba4731ef831a226bdde7c9ece6a282","unresolved":false,"context_lines":[{"line_number":187,"context_line":"        home_save \u003d \"%s/trove_user\" % mount_point"},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"        self.app.status.begin_restart()"},{"line_number":190,"context_line":"        self.app.drain()"},{"line_number":191,"context_line":"        self.app.stop_db()"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"        if not operating_system.exists(save_etc_dir):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fce034c_764c0b9e","line":190,"in_reply_to":"3fce034c_aab7a6d8","updated":"2019-04-17 09:02:31.000000000","message":"According to the Cassandra documentation is is recommended to drain database before upgrade: https://docs.datastax.com/en/upgrade/doc/upgrade/ddac/upgdDDACMinor51x.html (I know that it is a documentation DataStax Distribution of Apache Cassandra but it is difficult to find comprehensive guide for standard Cassandra versions).\nGraceful shutdown should be sufficient, however there are some nuances so it is safer to use drain.","commit_id":"64ddb554fd890ca2afd0757d11bbc8fa2fac829c"},{"author":{"_account_id":28695,"name":"Bartosz Zurkowski","email":"b.zurkowski@samsung.com","username":"b.zurkowski"},"change_message_id":"40eeb8cae1880087d15edc566c34803e9af11133","unresolved":false,"context_lines":[{"line_number":188,"context_line":""},{"line_number":189,"context_line":"        self.app.status.begin_restart()"},{"line_number":190,"context_line":"        self.app.drain()"},{"line_number":191,"context_line":"        self.app.stop_db()"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"        if not operating_system.exists(save_etc_dir):"},{"line_number":194,"context_line":"            operating_system.create_directory(save_etc_dir, as_root\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fce034c_4ac88254","line":191,"updated":"2019-04-12 08:24:24.000000000","message":"Does drain switches listeners into read-only mode to prevent new data between drain completion and shutdown?","commit_id":"64ddb554fd890ca2afd0757d11bbc8fa2fac829c"},{"author":{"_account_id":29995,"name":"Kasper Hasior","email":"k.hasior@partner.samsung.com","username":"k.hasior"},"change_message_id":"741aaf4c14ba4731ef831a226bdde7c9ece6a282","unresolved":false,"context_lines":[{"line_number":188,"context_line":""},{"line_number":189,"context_line":"        self.app.status.begin_restart()"},{"line_number":190,"context_line":"        self.app.drain()"},{"line_number":191,"context_line":"        self.app.stop_db()"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"        if not operating_system.exists(save_etc_dir):"},{"line_number":194,"context_line":"            operating_system.create_directory(save_etc_dir, as_root\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fce034c_964f3791","line":191,"in_reply_to":"3fce034c_4ac88254","updated":"2019-04-17 09:02:31.000000000","message":"yes","commit_id":"64ddb554fd890ca2afd0757d11bbc8fa2fac829c"},{"author":{"_account_id":28695,"name":"Bartosz Zurkowski","email":"b.zurkowski@samsung.com","username":"b.zurkowski"},"change_message_id":"40eeb8cae1880087d15edc566c34803e9af11133","unresolved":false,"context_lines":[{"line_number":190,"context_line":"        self.app.drain()"},{"line_number":191,"context_line":"        self.app.stop_db()"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"        if not operating_system.exists(save_etc_dir):"},{"line_number":194,"context_line":"            operating_system.create_directory(save_etc_dir, as_root\u003dTrue)"},{"line_number":195,"context_line":"        operating_system.copy(\"%s/.\" % self.app.cassandra_conf_dir,"},{"line_number":196,"context_line":"                              save_etc_dir,"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fce034c_8f2c3c48","line":193,"updated":"2019-04-12 08:24:24.000000000","message":"We should assume this directory does not exist. The condition is unneeded.","commit_id":"64ddb554fd890ca2afd0757d11bbc8fa2fac829c"},{"author":{"_account_id":28695,"name":"Bartosz Zurkowski","email":"b.zurkowski@samsung.com","username":"b.zurkowski"},"change_message_id":"7c5497555bc6a93ffe2c8639edfffbe30621fe60","unresolved":false,"context_lines":[{"line_number":190,"context_line":"        self.app.drain()"},{"line_number":191,"context_line":"        self.app.stop_db()"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"        if not operating_system.exists(save_etc_dir):"},{"line_number":194,"context_line":"            operating_system.create_directory(save_etc_dir, as_root\u003dTrue)"},{"line_number":195,"context_line":"        operating_system.copy(\"%s/.\" % self.app.cassandra_conf_dir,"},{"line_number":196,"context_line":"                              save_etc_dir,"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fce034c_b9ffff65","line":193,"in_reply_to":"3fce034c_50a91079","updated":"2019-04-12 12:08:59.000000000","message":"Good point, but I am not sure about removing the directories after the upgrade. Is it safe to do? What if we fail with reconfiguring the engine or copy the files to wrong destinations - may happen after upgrading guest to a newer version. We would need those backup files to debug and recover.\n\nWe should discuss possible scenarios in detail and then, if decided to proceed with implementation, apply changes to each datastore strategy. Let\u0027s postpone it as a future improvement and now reuse the directory if exists.\n\nAlso, do we need to create the directory explicitely? I guess, the \"copy\" method would handle pre-creating it. What about \"trove_user\"?\n\nFinally, there isa \"force\" option in \"create_directory\" method which ignores errors if requested directory already exists.","commit_id":"64ddb554fd890ca2afd0757d11bbc8fa2fac829c"},{"author":{"_account_id":29995,"name":"Kasper Hasior","email":"k.hasior@partner.samsung.com","username":"k.hasior"},"change_message_id":"f6698676df587fde99f91653ffdb89d0a44fdb31","unresolved":false,"context_lines":[{"line_number":190,"context_line":"        self.app.drain()"},{"line_number":191,"context_line":"        self.app.stop_db()"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"        if not operating_system.exists(save_etc_dir):"},{"line_number":194,"context_line":"            operating_system.create_directory(save_etc_dir, as_root\u003dTrue)"},{"line_number":195,"context_line":"        operating_system.copy(\"%s/.\" % self.app.cassandra_conf_dir,"},{"line_number":196,"context_line":"                              save_etc_dir,"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fce034c_50a91079","line":193,"in_reply_to":"3fce034c_8f2c3c48","updated":"2019-04-12 09:03:06.000000000","message":"Not exactly. We may perform multiple upgrades and in that case this directory would exist. Contents of the directory shouldn\u0027t be the problem since we override it. But maybe we should remove or clear this dir after we copy from it, what do you think?","commit_id":"64ddb554fd890ca2afd0757d11bbc8fa2fac829c"},{"author":{"_account_id":29995,"name":"Kasper Hasior","email":"k.hasior@partner.samsung.com","username":"k.hasior"},"change_message_id":"741aaf4c14ba4731ef831a226bdde7c9ece6a282","unresolved":false,"context_lines":[{"line_number":190,"context_line":"        self.app.drain()"},{"line_number":191,"context_line":"        self.app.stop_db()"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"        if not operating_system.exists(save_etc_dir):"},{"line_number":194,"context_line":"            operating_system.create_directory(save_etc_dir, as_root\u003dTrue)"},{"line_number":195,"context_line":"        operating_system.copy(\"%s/.\" % self.app.cassandra_conf_dir,"},{"line_number":196,"context_line":"                              save_etc_dir,"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fce034c_9150a10c","line":193,"in_reply_to":"3fce034c_b9ffff65","updated":"2019-04-17 09:02:31.000000000","message":"The problem with copy function is that it can handle creating destination directory but not nested directories. So as a destination we can set EXISTING_DIR/NEW_DIR, but we cannot set EXISTING_DIR/NEW_DIR1/NEW_DIR2\nHowever, since according to your suggestion I changed save_etc_dir it is no longer a problem.","commit_id":"64ddb554fd890ca2afd0757d11bbc8fa2fac829c"},{"author":{"_account_id":28695,"name":"Bartosz Zurkowski","email":"b.zurkowski@samsung.com","username":"b.zurkowski"},"change_message_id":"40eeb8cae1880087d15edc566c34803e9af11133","unresolved":false,"context_lines":[{"line_number":221,"context_line":""},{"line_number":222,"context_line":"        self.restore_home_directory(upgrade_info[\u0027home_save\u0027])"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"        operating_system.remove(self.app.cassandra_conf_dir,"},{"line_number":225,"context_line":"                                recursive\u003dTrue, force\u003dTrue, as_root\u003dTrue)"},{"line_number":226,"context_line":"        operating_system.copy(upgrade_info[\u0027save_etc_dir\u0027].rstrip(\u0027/\u0027),"},{"line_number":227,"context_line":"                              self.app.cassandra_conf_dir,"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fce034c_4af64292","line":224,"updated":"2019-04-12 08:24:24.000000000","message":"I am hesitant about removal of default configuration directory. What if a new version of Cassandra introduces additional files which are not present in a directory saved from an older version?","commit_id":"64ddb554fd890ca2afd0757d11bbc8fa2fac829c"},{"author":{"_account_id":29995,"name":"Kasper Hasior","email":"k.hasior@partner.samsung.com","username":"k.hasior"},"change_message_id":"741aaf4c14ba4731ef831a226bdde7c9ece6a282","unresolved":false,"context_lines":[{"line_number":221,"context_line":""},{"line_number":222,"context_line":"        self.restore_home_directory(upgrade_info[\u0027home_save\u0027])"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"        operating_system.remove(self.app.cassandra_conf_dir,"},{"line_number":225,"context_line":"                                recursive\u003dTrue, force\u003dTrue, as_root\u003dTrue)"},{"line_number":226,"context_line":"        operating_system.copy(upgrade_info[\u0027save_etc_dir\u0027].rstrip(\u0027/\u0027),"},{"line_number":227,"context_line":"                              self.app.cassandra_conf_dir,"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fce034c_51a8f9d9","line":224,"in_reply_to":"3fce034c_4af64292","updated":"2019-04-17 09:02:31.000000000","message":"Done","commit_id":"64ddb554fd890ca2afd0757d11bbc8fa2fac829c"},{"author":{"_account_id":28695,"name":"Bartosz Zurkowski","email":"b.zurkowski@samsung.com","username":"b.zurkowski"},"change_message_id":"40eeb8cae1880087d15edc566c34803e9af11133","unresolved":false,"context_lines":[{"line_number":231,"context_line":"                               user\u003dself.app.cassandra_owner,"},{"line_number":232,"context_line":"                               group\u003dself.app.cassandra_owner,"},{"line_number":233,"context_line":"                               recursive\u003dTrue,"},{"line_number":234,"context_line":"                               as_root\u003dTrue)"},{"line_number":235,"context_line":"        self._app \u003d None"},{"line_number":236,"context_line":"        self._admin \u003d None"},{"line_number":237,"context_line":"        self.app.start_db()"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fce034c_aa2a46e4","line":234,"updated":"2019-04-12 08:24:24.000000000","message":"Aren\u0027t we missing a configuration manager refresh? Note the following statement in MySQL strategy:\n\n self.configuration_manager.refresh_cache()","commit_id":"64ddb554fd890ca2afd0757d11bbc8fa2fac829c"},{"author":{"_account_id":29995,"name":"Kasper Hasior","email":"k.hasior@partner.samsung.com","username":"k.hasior"},"change_message_id":"f6698676df587fde99f91653ffdb89d0a44fdb31","unresolved":false,"context_lines":[{"line_number":231,"context_line":"                               user\u003dself.app.cassandra_owner,"},{"line_number":232,"context_line":"                               group\u003dself.app.cassandra_owner,"},{"line_number":233,"context_line":"                               recursive\u003dTrue,"},{"line_number":234,"context_line":"                               as_root\u003dTrue)"},{"line_number":235,"context_line":"        self._app \u003d None"},{"line_number":236,"context_line":"        self._admin \u003d None"},{"line_number":237,"context_line":"        self.app.start_db()"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fce034c_b00dd491","line":234,"in_reply_to":"3fce034c_aa2a46e4","updated":"2019-04-12 09:03:06.000000000","message":"I think not. MySQL stores configuration_manager as a class field, not as an instance field. Later we force reloading app object so new configuration_manager is created.","commit_id":"64ddb554fd890ca2afd0757d11bbc8fa2fac829c"},{"author":{"_account_id":28695,"name":"Bartosz Zurkowski","email":"b.zurkowski@samsung.com","username":"b.zurkowski"},"change_message_id":"40eeb8cae1880087d15edc566c34803e9af11133","unresolved":false,"context_lines":[{"line_number":232,"context_line":"                               group\u003dself.app.cassandra_owner,"},{"line_number":233,"context_line":"                               recursive\u003dTrue,"},{"line_number":234,"context_line":"                               as_root\u003dTrue)"},{"line_number":235,"context_line":"        self._app \u003d None"},{"line_number":236,"context_line":"        self._admin \u003d None"},{"line_number":237,"context_line":"        self.app.start_db()"},{"line_number":238,"context_line":"        self.app.upgrade_sstables()"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fce034c_eac4ce42","line":235,"updated":"2019-04-12 08:24:24.000000000","message":"Why do we need to reset \"app\"?","commit_id":"64ddb554fd890ca2afd0757d11bbc8fa2fac829c"},{"author":{"_account_id":29995,"name":"Kasper Hasior","email":"k.hasior@partner.samsung.com","username":"k.hasior"},"change_message_id":"741aaf4c14ba4731ef831a226bdde7c9ece6a282","unresolved":false,"context_lines":[{"line_number":232,"context_line":"                               group\u003dself.app.cassandra_owner,"},{"line_number":233,"context_line":"                               recursive\u003dTrue,"},{"line_number":234,"context_line":"                               as_root\u003dTrue)"},{"line_number":235,"context_line":"        self._app \u003d None"},{"line_number":236,"context_line":"        self._admin \u003d None"},{"line_number":237,"context_line":"        self.app.start_db()"},{"line_number":238,"context_line":"        self.app.upgrade_sstables()"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fce034c_40fed037","line":235,"in_reply_to":"3fce034c_391b0f1c","updated":"2019-04-17 09:02:31.000000000","message":"Done","commit_id":"64ddb554fd890ca2afd0757d11bbc8fa2fac829c"},{"author":{"_account_id":28695,"name":"Bartosz Zurkowski","email":"b.zurkowski@samsung.com","username":"b.zurkowski"},"change_message_id":"7c5497555bc6a93ffe2c8639edfffbe30621fe60","unresolved":false,"context_lines":[{"line_number":232,"context_line":"                               group\u003dself.app.cassandra_owner,"},{"line_number":233,"context_line":"                               recursive\u003dTrue,"},{"line_number":234,"context_line":"                               as_root\u003dTrue)"},{"line_number":235,"context_line":"        self._app \u003d None"},{"line_number":236,"context_line":"        self._admin \u003d None"},{"line_number":237,"context_line":"        self.app.start_db()"},{"line_number":238,"context_line":"        self.app.upgrade_sstables()"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fce034c_391b0f1c","line":235,"in_reply_to":"3fce034c_b034f44b","updated":"2019-04-12 12:08:59.000000000","message":"I see. Let\u0027s add \"_reset_app\" helper method to wrap resetting of \"app\" and \"admin\" objects. Then, reuse in class constructor and \"post_upgrade\" method. Also, add comment in the doc string to motivate reset procedure (config manager reload, status object re-init etc.).","commit_id":"64ddb554fd890ca2afd0757d11bbc8fa2fac829c"},{"author":{"_account_id":29995,"name":"Kasper Hasior","email":"k.hasior@partner.samsung.com","username":"k.hasior"},"change_message_id":"f6698676df587fde99f91653ffdb89d0a44fdb31","unresolved":false,"context_lines":[{"line_number":232,"context_line":"                               group\u003dself.app.cassandra_owner,"},{"line_number":233,"context_line":"                               recursive\u003dTrue,"},{"line_number":234,"context_line":"                               as_root\u003dTrue)"},{"line_number":235,"context_line":"        self._app \u003d None"},{"line_number":236,"context_line":"        self._admin \u003d None"},{"line_number":237,"context_line":"        self.app.start_db()"},{"line_number":238,"context_line":"        self.app.upgrade_sstables()"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fce034c_b034f44b","line":235,"in_reply_to":"3fce034c_eac4ce42","updated":"2019-04-12 09:03:06.000000000","message":"Cassandra password is stored in a hidden file in home directory. App object is created before restoring home directory so it does\u0027nt have access to it and as a resul cannot connect to the cluster. We need to reload app object.","commit_id":"64ddb554fd890ca2afd0757d11bbc8fa2fac829c"},{"author":{"_account_id":28695,"name":"Bartosz Zurkowski","email":"b.zurkowski@samsung.com","username":"b.zurkowski"},"change_message_id":"40eeb8cae1880087d15edc566c34803e9af11133","unresolved":false,"context_lines":[{"line_number":233,"context_line":"                               recursive\u003dTrue,"},{"line_number":234,"context_line":"                               as_root\u003dTrue)"},{"line_number":235,"context_line":"        self._app \u003d None"},{"line_number":236,"context_line":"        self._admin \u003d None"},{"line_number":237,"context_line":"        self.app.start_db()"},{"line_number":238,"context_line":"        self.app.upgrade_sstables()"},{"line_number":239,"context_line":"        self.app.status.end_restart()"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fce034c_0ac27a34","line":236,"updated":"2019-04-12 08:24:24.000000000","message":"Why do we need to reset \"admin\"?","commit_id":"64ddb554fd890ca2afd0757d11bbc8fa2fac829c"},{"author":{"_account_id":29995,"name":"Kasper Hasior","email":"k.hasior@partner.samsung.com","username":"k.hasior"},"change_message_id":"f6698676df587fde99f91653ffdb89d0a44fdb31","unresolved":false,"context_lines":[{"line_number":233,"context_line":"                               recursive\u003dTrue,"},{"line_number":234,"context_line":"                               as_root\u003dTrue)"},{"line_number":235,"context_line":"        self._app \u003d None"},{"line_number":236,"context_line":"        self._admin \u003d None"},{"line_number":237,"context_line":"        self.app.start_db()"},{"line_number":238,"context_line":"        self.app.upgrade_sstables()"},{"line_number":239,"context_line":"        self.app.status.end_restart()"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fce034c_703e8c2a","line":236,"in_reply_to":"3fce034c_0ac27a34","updated":"2019-04-12 09:03:06.000000000","message":"This object is created from self.app and we reload app so we should also reload admin.","commit_id":"64ddb554fd890ca2afd0757d11bbc8fa2fac829c"}],"trove/guestagent/datastore/experimental/cassandra/service.py":[{"author":{"_account_id":28695,"name":"Bartosz Zurkowski","email":"b.zurkowski@samsung.com","username":"b.zurkowski"},"change_message_id":"a1a9ca16c6671e73449216f0f6a6f6536679a216","unresolved":false,"context_lines":[{"line_number":717,"context_line":"        self.logback_conf_manager.apply_system_override("},{"line_number":718,"context_line":"            {\u0027configuration\u0027: {\u0027root\u0027: {\u0027@level\u0027: log_level}}})"},{"line_number":719,"context_line":""},{"line_number":720,"context_line":"    def drain(self):"},{"line_number":721,"context_line":"        \"\"\"Drains Cassandra node so that it can upgraded safely."},{"line_number":722,"context_line":"        \"\"\""},{"line_number":723,"context_line":"        LOG.debug(\"Draining node.\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"ffb9cba7_1269298a","line":720,"updated":"2019-04-24 14:04:29.000000000","message":"What about a test for this method?","commit_id":"7d88c358c41a7b030e170c6ee49d414021900fe9"},{"author":{"_account_id":29995,"name":"Kasper Hasior","email":"k.hasior@partner.samsung.com","username":"k.hasior"},"change_message_id":"3f946c9e655952fafb2e9f80e31a93d2752b53f7","unresolved":false,"context_lines":[{"line_number":717,"context_line":"        self.logback_conf_manager.apply_system_override("},{"line_number":718,"context_line":"            {\u0027configuration\u0027: {\u0027root\u0027: {\u0027@level\u0027: log_level}}})"},{"line_number":719,"context_line":""},{"line_number":720,"context_line":"    def drain(self):"},{"line_number":721,"context_line":"        \"\"\"Drains Cassandra node so that it can upgraded safely."},{"line_number":722,"context_line":"        \"\"\""},{"line_number":723,"context_line":"        LOG.debug(\"Draining node.\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"ffb9cba7_62c18c2e","line":720,"in_reply_to":"ffb9cba7_1269298a","updated":"2019-04-26 07:35:09.000000000","message":"Done","commit_id":"7d88c358c41a7b030e170c6ee49d414021900fe9"},{"author":{"_account_id":28695,"name":"Bartosz Zurkowski","email":"b.zurkowski@samsung.com","username":"b.zurkowski"},"change_message_id":"a1a9ca16c6671e73449216f0f6a6f6536679a216","unresolved":false,"context_lines":[{"line_number":723,"context_line":"        LOG.debug(\"Draining node.\")"},{"line_number":724,"context_line":"        self._run_nodetool_command(\u0027drain\u0027)"},{"line_number":725,"context_line":""},{"line_number":726,"context_line":"    def upgrade_sstables(self):"},{"line_number":727,"context_line":"        \"\"\"Upgrades sstables to match new datastore version."},{"line_number":728,"context_line":"        \"\"\""},{"line_number":729,"context_line":"        LOG.debug(\"Upgrading sstables.\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"ffb9cba7_b205bdc4","line":726,"updated":"2019-04-24 14:04:29.000000000","message":"What about a test for this method?","commit_id":"7d88c358c41a7b030e170c6ee49d414021900fe9"},{"author":{"_account_id":29995,"name":"Kasper Hasior","email":"k.hasior@partner.samsung.com","username":"k.hasior"},"change_message_id":"3f946c9e655952fafb2e9f80e31a93d2752b53f7","unresolved":false,"context_lines":[{"line_number":723,"context_line":"        LOG.debug(\"Draining node.\")"},{"line_number":724,"context_line":"        self._run_nodetool_command(\u0027drain\u0027)"},{"line_number":725,"context_line":""},{"line_number":726,"context_line":"    def upgrade_sstables(self):"},{"line_number":727,"context_line":"        \"\"\"Upgrades sstables to match new datastore version."},{"line_number":728,"context_line":"        \"\"\""},{"line_number":729,"context_line":"        LOG.debug(\"Upgrading sstables.\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"ffb9cba7_02de9010","line":726,"in_reply_to":"ffb9cba7_b205bdc4","updated":"2019-04-26 07:35:09.000000000","message":"Done","commit_id":"7d88c358c41a7b030e170c6ee49d414021900fe9"}],"trove/taskmanager/models.py":[{"author":{"_account_id":28695,"name":"Bartosz Zurkowski","email":"b.zurkowski@samsung.com","username":"b.zurkowski"},"change_message_id":"a1a9ca16c6671e73449216f0f6a6f6536679a216","unresolved":false,"context_lines":[{"line_number":391,"context_line":"                    context, db_inst.id)"},{"line_number":392,"context_line":"                instances.append(instance)"},{"line_number":393,"context_line":""},{"line_number":394,"context_line":"            if ordering_function is not None:"},{"line_number":395,"context_line":"                instances.sort(key\u003dordering_function)"},{"line_number":396,"context_line":""},{"line_number":397,"context_line":"            for instance in instances:"},{"line_number":398,"context_line":"                _upgrade_cluster_instance(instance)"},{"line_number":399,"context_line":""},{"line_number":400,"context_line":"            self.reset_task()"},{"line_number":401,"context_line":"        except Timeout as t:"}],"source_content_type":"text/x-python","patch_set":6,"id":"ffb9cba7_b2ddbd15","line":398,"range":{"start_line":394,"start_character":0,"end_line":398,"end_character":51},"updated":"2019-04-24 14:04:29.000000000","message":"What about a test covering this use case?","commit_id":"7d88c358c41a7b030e170c6ee49d414021900fe9"},{"author":{"_account_id":29995,"name":"Kasper Hasior","email":"k.hasior@partner.samsung.com","username":"k.hasior"},"change_message_id":"3f946c9e655952fafb2e9f80e31a93d2752b53f7","unresolved":false,"context_lines":[{"line_number":391,"context_line":"                    context, db_inst.id)"},{"line_number":392,"context_line":"                instances.append(instance)"},{"line_number":393,"context_line":""},{"line_number":394,"context_line":"            if ordering_function is not None:"},{"line_number":395,"context_line":"                instances.sort(key\u003dordering_function)"},{"line_number":396,"context_line":""},{"line_number":397,"context_line":"            for instance in instances:"},{"line_number":398,"context_line":"                _upgrade_cluster_instance(instance)"},{"line_number":399,"context_line":""},{"line_number":400,"context_line":"            self.reset_task()"},{"line_number":401,"context_line":"        except Timeout as t:"}],"source_content_type":"text/x-python","patch_set":6,"id":"ffb9cba7_22e154d1","line":398,"range":{"start_line":394,"start_character":0,"end_line":398,"end_character":51},"in_reply_to":"ffb9cba7_b2ddbd15","updated":"2019-04-26 07:35:09.000000000","message":"Done","commit_id":"7d88c358c41a7b030e170c6ee49d414021900fe9"}]}
