)]}'
{"swift/container/backend.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"a8dd10db4c5a3a2e8929566c2cbab1dbe6ca5256","unresolved":false,"context_lines":[{"line_number":371,"context_line":"        self.create_policy_stat_table(conn, storage_policy_index)"},{"line_number":372,"context_line":"        self.create_container_info_table(conn, put_timestamp,"},{"line_number":373,"context_line":"                                         storage_policy_index)"},{"line_number":374,"context_line":"        self.create_shard_ranges_table(conn)"},{"line_number":375,"context_line":""},{"line_number":376,"context_line":"    def create_object_table(self, conn):"},{"line_number":377,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_deac6da0","line":374,"range":{"start_line":374,"start_character":8,"end_line":374,"end_character":44},"updated":"2017-09-28 23:25:31.000000000","message":"To test, comment this out -- all tests (unit \u0026 probe) should still pass.","commit_id":"717757ee61471c43ab583598068f0c754558cc14"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"55782c86ffb9410888212c3bdbb854e171c08f1c","unresolved":false,"context_lines":[{"line_number":713,"context_line":"                            id, %s, %s"},{"line_number":714,"context_line":"                            FROM container_stat"},{"line_number":715,"context_line":"                    \u0027\u0027\u0027) % (trailing_sync, trailing_pol)).fetchone()"},{"line_number":716,"context_line":"                except sqlite3.OperationalError as err:"},{"line_number":717,"context_line":"                    err_msg \u003d str(err)"},{"line_number":718,"context_line":"                    if err_msg in errors:"},{"line_number":719,"context_line":"                        # only attempt each migration once"},{"line_number":720,"context_line":"                        raise"},{"line_number":721,"context_line":"                    errors.add(err_msg)"},{"line_number":722,"context_line":"                    if \u0027no such column: storage_policy_index\u0027 in err_msg:"},{"line_number":723,"context_line":"                        trailing_pol \u003d \u00270 AS storage_policy_index\u0027"},{"line_number":724,"context_line":"                    elif \u0027no such column: x_container_sync_point\u0027 in err_msg:"},{"line_number":725,"context_line":"                        trailing_sync \u003d \u0027-1 AS x_container_sync_point1, \u0027 \\"},{"line_number":726,"context_line":"                                        \u0027-1 AS x_container_sync_point2\u0027"},{"line_number":727,"context_line":"                    else:"},{"line_number":728,"context_line":"                        raise"},{"line_number":729,"context_line":"            data \u003d dict(data)"},{"line_number":730,"context_line":"            # populate instance cache"},{"line_number":731,"context_line":"            self._storage_policy_index \u003d data[\u0027storage_policy_index\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_f3ec9e2a","line":728,"range":{"start_line":716,"start_character":0,"end_line":728,"end_character":29},"updated":"2017-10-04 15:30:51.000000000","message":"FWIW, this was my rough model for the multi-migration -- and sure enough, it goes for the if/elif/else: raise\n\nWill fix.","commit_id":"717757ee61471c43ab583598068f0c754558cc14"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"94eaa808a435e54ea0a0e3f2da81be3683d9de99","unresolved":false,"context_lines":[{"line_number":1206,"context_line":"                    if \u0027no such column: storage_policy_index\u0027 in err:"},{"line_number":1207,"context_line":"                        self._migrate_add_storage_policy(conn)"},{"line_number":1208,"context_line":"                    if \u0027no such table: shard_ranges\u0027 in err:"},{"line_number":1209,"context_line":"                        self.create_shard_ranges_table(conn)"},{"line_number":1210,"context_line":""},{"line_number":1211,"context_line":"    def get_reconciler_sync(self):"},{"line_number":1212,"context_line":"        with self.get() as conn:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_5d0cb13a","line":1209,"updated":"2017-10-04 04:35:12.000000000","message":"What if the error is something else not covered by the if statements? In this case we will always run it twice. Not that I can think of an error, but if there is one I might not want it to run twice.\n\nShould we if, elif, else raise? I guess you could have both problems at once, so maybe: if continue, if continue, raise.. tho that kinda makes it feel like a while true isn\u0027t quite right. Maybe unloop and:\n\n  try:\n      return _really_merge_items(conn)\n  except sqlite3.OperationalError as err:\n      retry \u003d False\n      if \u0027no such column: storage..\n          ...\n          retry \u003d True\n      if \u0027no such table: shard_ranges\u0027...\n          ...\n          retry \u003d True\n      if retry:\n          return _really_merge_items(conn)","commit_id":"717757ee61471c43ab583598068f0c754558cc14"}]}
