)]}'
{"swift/common/db.py":[{"author":{"_account_id":917,"name":"Chuck Thier","email":"cthier@gmail.com","username":"cthier"},"change_message_id":"ccb4aa5896324ff87fea0e8c3785e215e166fad5","unresolved":false,"context_lines":[{"line_number":216,"context_line":"        return self.db_file"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"    def initialize(self, put_timestamp\u003dNone, *_initialize_args):"},{"line_number":219,"context_line":"        \"\"\""},{"line_number":220,"context_line":"        Create the DB"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"        :param put_timestamp: timestamp of initial PUT request"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_c5d3d236","line":219,"updated":"2014-05-30 18:23:15.000000000","message":"I\u0027ve never been a fan of passing args around like *_initialize_args.\n\nIt looks like the only difference is that the ContainerBroker has the added storage_policy_index.  What if instead the call signatures were something like\n\ndef initialize(self, put_timestamp\u003dNone, storage_policy_index\u003dNone)","commit_id":"ae977eae20ced6b93e644dc653870aca84dac633"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"b71e6a47d310a196130764cd330bac242b96023a","unresolved":false,"context_lines":[{"line_number":216,"context_line":"        return self.db_file"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"    def initialize(self, put_timestamp\u003dNone, *_initialize_args):"},{"line_number":219,"context_line":"        \"\"\""},{"line_number":220,"context_line":"        Create the DB"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"        :param put_timestamp: timestamp of initial PUT request"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_32966d95","line":219,"in_reply_to":"1ae5cdf2_c5d3d236","updated":"2014-05-30 22:16:08.000000000","message":"Because those args aren\u0027t for us - they\u0027re for the subclasses.  Why name them all here just to name then again when we pass them through - and update the list of names when another is added?\n\nIf this function needed them they should be named - if the plan is always to hand the extra args off they should be in a splat.  I\u0027ll update the doc to indicate how additional args as passed through.\n\nDone.","commit_id":"ae977eae20ced6b93e644dc653870aca84dac633"},{"author":{"_account_id":917,"name":"Chuck Thier","email":"cthier@gmail.com","username":"cthier"},"change_message_id":"ccb4aa5896324ff87fea0e8c3785e215e166fad5","unresolved":false,"context_lines":[{"line_number":521,"context_line":"            curs \u003d conn.execute(\u0027SELECT * from %s_stat\u0027 % self.db_type)"},{"line_number":522,"context_line":"            curs.row_factory \u003d dict_factory"},{"line_number":523,"context_line":"            result \u003d curs.fetchone()"},{"line_number":524,"context_line":"            return result"},{"line_number":525,"context_line":""},{"line_number":526,"context_line":"    def _commit_puts(self, item_list\u003dNone):"},{"line_number":527,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_28152bf1","line":524,"updated":"2014-05-30 18:23:15.000000000","message":"nit: should just return the result directly","commit_id":"ae977eae20ced6b93e644dc653870aca84dac633"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"b71e6a47d310a196130764cd330bac242b96023a","unresolved":false,"context_lines":[{"line_number":521,"context_line":"            curs \u003d conn.execute(\u0027SELECT * from %s_stat\u0027 % self.db_type)"},{"line_number":522,"context_line":"            curs.row_factory \u003d dict_factory"},{"line_number":523,"context_line":"            result \u003d curs.fetchone()"},{"line_number":524,"context_line":"            return result"},{"line_number":525,"context_line":""},{"line_number":526,"context_line":"    def _commit_puts(self, item_list\u003dNone):"},{"line_number":527,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_1226d1b7","line":524,"in_reply_to":"1ae5cdf2_28152bf1","updated":"2014-05-30 22:16:08.000000000","message":"Done","commit_id":"ae977eae20ced6b93e644dc653870aca84dac633"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"fc8a5742b88eafe87d00e03dacaf39ce0fb6dd12","unresolved":false,"context_lines":[{"line_number":493,"context_line":"        :returns: dict containing keys: hash, id, created_at, put_timestamp,"},{"line_number":494,"context_line":"            delete_timestamp, count, max_row, and metadata"},{"line_number":495,"context_line":"        \"\"\""},{"line_number":496,"context_line":"        self._commit_puts_stale_ok()"},{"line_number":497,"context_line":"        query_part1 \u003d \u0027\u0027\u0027"},{"line_number":498,"context_line":"            SELECT hash, id, created_at, put_timestamp, delete_timestamp,"},{"line_number":499,"context_line":"                %s_count AS count,"}],"source_content_type":"text/x-python","patch_set":8,"id":"1ae5cdf2_ec51490f","side":"PARENT","line":496,"updated":"2014-06-03 04:11:28.000000000","message":"This _commit_puts() is gone in the new code, I\u0027m curious why this is okay (I trust you thought about it, but I can\u0027t begin grasping it)","commit_id":"088bc4ac3870946d6d16e257313ec415fb41315a"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"ef8c17350d247bdeb0b55292e7aef21a83502001","unresolved":false,"context_lines":[{"line_number":493,"context_line":"        :returns: dict containing keys: hash, id, created_at, put_timestamp,"},{"line_number":494,"context_line":"            delete_timestamp, count, max_row, and metadata"},{"line_number":495,"context_line":"        \"\"\""},{"line_number":496,"context_line":"        self._commit_puts_stale_ok()"},{"line_number":497,"context_line":"        query_part1 \u003d \u0027\u0027\u0027"},{"line_number":498,"context_line":"            SELECT hash, id, created_at, put_timestamp, delete_timestamp,"},{"line_number":499,"context_line":"                %s_count AS count,"}],"source_content_type":"text/x-python","patch_set":8,"id":"1ae5cdf2_79c3ecec","side":"PARENT","line":496,"in_reply_to":"1ae5cdf2_ec51490f","updated":"2014-06-04 20:33:15.000000000","message":"I think it\u0027s still in get_info","commit_id":"088bc4ac3870946d6d16e257313ec415fb41315a"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"fc8a5742b88eafe87d00e03dacaf39ce0fb6dd12","unresolved":false,"context_lines":[{"line_number":515,"context_line":"        Note:: get_info\u0027s \u003cdb_contains_type\u003e_count is translated to just"},{"line_number":516,"context_line":"               \"count\" and metadata is the raw string."},{"line_number":517,"context_line":"        \"\"\""},{"line_number":518,"context_line":"        info \u003d self.get_info()"},{"line_number":519,"context_line":"        info[\u0027count\u0027] \u003d info.pop(\u0027%s_count\u0027 % self.db_contains_type)"},{"line_number":520,"context_line":"        info[\u0027metadata\u0027] \u003d self.get_raw_metadata()"},{"line_number":521,"context_line":"        info[\u0027max_row\u0027] \u003d self.get_max_row()"}],"source_content_type":"text/x-python","patch_set":8,"id":"1ae5cdf2_2c7331b2","line":518,"updated":"2014-06-03 04:11:28.000000000","message":"Chuck mentioned a few minutes ago that container servers are CPU bound. Here you take that one DB open in get_replication_info() and replace it with 3 functions. The readability improvement is HUGE, great many thanks. But... What would it take to put all 3 into with self.get() as conn, then pass conn as argument to the 3?","commit_id":"e1536f605f51eb2bb8423448a6d8752ba47fecfe"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"ef8c17350d247bdeb0b55292e7aef21a83502001","unresolved":false,"context_lines":[{"line_number":515,"context_line":"        Note:: get_info\u0027s \u003cdb_contains_type\u003e_count is translated to just"},{"line_number":516,"context_line":"               \"count\" and metadata is the raw string."},{"line_number":517,"context_line":"        \"\"\""},{"line_number":518,"context_line":"        info \u003d self.get_info()"},{"line_number":519,"context_line":"        info[\u0027count\u0027] \u003d info.pop(\u0027%s_count\u0027 % self.db_contains_type)"},{"line_number":520,"context_line":"        info[\u0027metadata\u0027] \u003d self.get_raw_metadata()"},{"line_number":521,"context_line":"        info[\u0027max_row\u0027] \u003d self.get_max_row()"}],"source_content_type":"text/x-python","patch_set":8,"id":"1ae5cdf2_d90de03f","line":518,"in_reply_to":"1ae5cdf2_2c7331b2","updated":"2014-06-04 20:33:15.000000000","message":"yeah that\u0027s a good idea, if I could make the connection reentrant it\u0027d probably be pretty clean to make it possible *optionally* pass in an open connection, but I think a better cleanup would be to maybe just make underfunctions for all of these that take a connection... maybe","commit_id":"e1536f605f51eb2bb8423448a6d8752ba47fecfe"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"29212a43cbd0f6a171861d1e7adc0b47a58374f2","unresolved":false,"context_lines":[{"line_number":515,"context_line":"        Note:: get_info\u0027s \u003cdb_contains_type\u003e_count is translated to just"},{"line_number":516,"context_line":"               \"count\" and metadata is the raw string."},{"line_number":517,"context_line":"        \"\"\""},{"line_number":518,"context_line":"        info \u003d self.get_info()"},{"line_number":519,"context_line":"        info[\u0027count\u0027] \u003d info.pop(\u0027%s_count\u0027 % self.db_contains_type)"},{"line_number":520,"context_line":"        info[\u0027metadata\u0027] \u003d self.get_raw_metadata()"},{"line_number":521,"context_line":"        info[\u0027max_row\u0027] \u003d self.get_max_row()"}],"source_content_type":"text/x-python","patch_set":8,"id":"1ae5cdf2_409f0703","line":518,"in_reply_to":"1ae5cdf2_6c57a258","updated":"2014-06-05 16:21:12.000000000","message":"Done","commit_id":"e1536f605f51eb2bb8423448a6d8752ba47fecfe"},{"author":{"_account_id":5600,"name":"Brian Cline","email":"bcline@softlayer.com","username":"briancline"},"change_message_id":"f79c9fed1bbc9d4af03230c583157da28d4cd99f","unresolved":false,"context_lines":[{"line_number":515,"context_line":"        Note:: get_info\u0027s \u003cdb_contains_type\u003e_count is translated to just"},{"line_number":516,"context_line":"               \"count\" and metadata is the raw string."},{"line_number":517,"context_line":"        \"\"\""},{"line_number":518,"context_line":"        info \u003d self.get_info()"},{"line_number":519,"context_line":"        info[\u0027count\u0027] \u003d info.pop(\u0027%s_count\u0027 % self.db_contains_type)"},{"line_number":520,"context_line":"        info[\u0027metadata\u0027] \u003d self.get_raw_metadata()"},{"line_number":521,"context_line":"        info[\u0027max_row\u0027] \u003d self.get_max_row()"}],"source_content_type":"text/x-python","patch_set":8,"id":"1ae5cdf2_6c57a258","line":518,"in_reply_to":"1ae5cdf2_d90de03f","updated":"2014-06-05 05:48:46.000000000","message":"I love the readability improvement as well here -- though from a stylistic perspective I\u0027m not sure I would change it unless there\u0027s a measurable negative performance impact in keeping it as it is in this revision. I think it\u0027s actually clearer this way.","commit_id":"e1536f605f51eb2bb8423448a6d8752ba47fecfe"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"0000017c5e9a01c0bf35aa6df3bde7266abf94fa","unresolved":false,"context_lines":[{"line_number":433,"context_line":"        :param put_timestamp: put timestamp"},{"line_number":434,"context_line":"        :param delete_timestamp: delete timestamp"},{"line_number":435,"context_line":"        \"\"\""},{"line_number":436,"context_line":"        current_status \u003d self.is_deleted()"},{"line_number":437,"context_line":"        with self.get() as conn:"},{"line_number":438,"context_line":"            conn.execute(\u0027\u0027\u0027"},{"line_number":439,"context_line":"                UPDATE %s_stat SET created_at\u003dMIN(?, created_at),"}],"source_content_type":"text/x-python","patch_set":13,"id":"1ae5cdf2_7ce36ca4","line":436,"updated":"2014-06-16 21:09:24.000000000","message":"This sequence concerns me, but perhaps I don\u0027t understand things well enough.\n\nShould we not check the first is_deleted() result within the context of the transaction, and then issue the update status changed at as part of the transactions as well?","commit_id":"d672c8f33c50a15d7dad397ad5f801c971c685be"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"259a86085a9ae728fc68693dc12854a89bebee53","unresolved":false,"context_lines":[{"line_number":433,"context_line":"        :param put_timestamp: put timestamp"},{"line_number":434,"context_line":"        :param delete_timestamp: delete timestamp"},{"line_number":435,"context_line":"        \"\"\""},{"line_number":436,"context_line":"        current_status \u003d self.is_deleted()"},{"line_number":437,"context_line":"        with self.get() as conn:"},{"line_number":438,"context_line":"            conn.execute(\u0027\u0027\u0027"},{"line_number":439,"context_line":"                UPDATE %s_stat SET created_at\u003dMIN(?, created_at),"}],"source_content_type":"text/x-python","patch_set":13,"id":"1ae5cdf2_be303f08","line":436,"in_reply_to":"1ae5cdf2_7ce36ca4","updated":"2014-06-18 07:55:04.000000000","message":"Done","commit_id":"d672c8f33c50a15d7dad397ad5f801c971c685be"}],"swift/container/backend.py":[{"author":{"_account_id":917,"name":"Chuck Thier","email":"cthier@gmail.com","username":"cthier"},"change_message_id":"ccb4aa5896324ff87fea0e8c3785e215e166fad5","unresolved":false,"context_lines":[{"line_number":29,"context_line":"    PENDING_CAP, PICKLE_PROTOCOL, utf8encode"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"DATADIR \u003d \u0027containers\u0027"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"POLICY_STAT_TABLE_CREATE \u003d \"\"\""},{"line_number":34,"context_line":"    CREATE TABLE policy_stat ("},{"line_number":35,"context_line":"        storage_policy_index INTEGER PRIMARY KEY,"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_0e9a3763","line":32,"updated":"2014-05-30 18:23:15.000000000","message":"After talking to peluse_ on IRC a bit, it seems like the policy_stat stuff shouldn\u0027t be needed on the container dbs?","commit_id":"ae977eae20ced6b93e644dc653870aca84dac633"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"b71e6a47d310a196130764cd330bac242b96023a","unresolved":false,"context_lines":[{"line_number":29,"context_line":"    PENDING_CAP, PICKLE_PROTOCOL, utf8encode"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"DATADIR \u003d \u0027containers\u0027"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"POLICY_STAT_TABLE_CREATE \u003d \"\"\""},{"line_number":34,"context_line":"    CREATE TABLE policy_stat ("},{"line_number":35,"context_line":"        storage_policy_index INTEGER PRIMARY KEY,"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_92bbc10d","line":32,"in_reply_to":"1ae5cdf2_0e9a3763","updated":"2014-05-30 22:16:08.000000000","message":"It is, see https://gist.github.com/clayg/84e11b94735016c1c341","commit_id":"ae977eae20ced6b93e644dc653870aca84dac633"},{"author":{"_account_id":1216,"name":"gholt","email":"z-launchpad@brim.net","username":"gholt"},"change_message_id":"205689b066ea5960b5162694429d54479395e539","unresolved":false,"context_lines":[{"line_number":115,"context_line":"                content_type TEXT,"},{"line_number":116,"context_line":"                etag TEXT,"},{"line_number":117,"context_line":"                deleted INTEGER DEFAULT 0,"},{"line_number":118,"context_line":"                storage_policy_index INTEGER"},{"line_number":119,"context_line":"            );"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"            CREATE INDEX ix_object_deleted_name ON object (deleted, name);"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_7cf1accc","line":118,"updated":"2014-05-30 21:19:52.000000000","message":"Shouldn\u0027t this have a DEFAULT 0?","commit_id":"ae977eae20ced6b93e644dc653870aca84dac633"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"b71e6a47d310a196130764cd330bac242b96023a","unresolved":false,"context_lines":[{"line_number":115,"context_line":"                content_type TEXT,"},{"line_number":116,"context_line":"                etag TEXT,"},{"line_number":117,"context_line":"                deleted INTEGER DEFAULT 0,"},{"line_number":118,"context_line":"                storage_policy_index INTEGER"},{"line_number":119,"context_line":"            );"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"            CREATE INDEX ix_object_deleted_name ON object (deleted, name);"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_725555c5","line":118,"in_reply_to":"1ae5cdf2_7cf1accc","updated":"2014-05-30 22:16:08.000000000","message":"yes, might help with downgrades.\n\nDone.","commit_id":"ae977eae20ced6b93e644dc653870aca84dac633"},{"author":{"_account_id":1216,"name":"gholt","email":"z-launchpad@brim.net","username":"gholt"},"change_message_id":"31cfbf1939f1c115847e3e3466754cdfb17fb254","unresolved":false,"context_lines":[{"line_number":752,"context_line":"            AND storage_policy_index !\u003d ("},{"line_number":753,"context_line":"                SELECT storage_policy_index FROM container_stat LIMIT 1)"},{"line_number":754,"context_line":"            ORDER BY ROWID ASC LIMIT ?"},{"line_number":755,"context_line":"        \"\"\""},{"line_number":756,"context_line":"        self._commit_puts_stale_ok()"},{"line_number":757,"context_line":"        with self.get() as conn:"},{"line_number":758,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_a12b11ea","line":755,"updated":"2014-05-30 20:53:01.000000000","message":"I\u0027m a bit worried this query could get called by accident on a huge database and, since there is no index on storage_policy_index, it would lock up that database for quite some time. Perhaps an extra check on the row count and just log a critical error if it exceeds some number?\n\nI know it should never happen because reconciliation should happen very early in a container\u0027s life. I\u0027m more worried about a coding bug in the future that ends up having this called -- and no one would notice until production since everything would be fast on smaller clusters.\n\nAlso, do we just want to skip deletions for this migration reconciliation?\n\nLastly, and really just a note to myself, but we need to make sure this query is using the ix_object_deleted_name index and if not, that we +deleted or whatever is necessary to make it do so.","commit_id":"ae977eae20ced6b93e644dc653870aca84dac633"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"b71e6a47d310a196130764cd330bac242b96023a","unresolved":false,"context_lines":[{"line_number":752,"context_line":"            AND storage_policy_index !\u003d ("},{"line_number":753,"context_line":"                SELECT storage_policy_index FROM container_stat LIMIT 1)"},{"line_number":754,"context_line":"            ORDER BY ROWID ASC LIMIT ?"},{"line_number":755,"context_line":"        \"\"\""},{"line_number":756,"context_line":"        self._commit_puts_stale_ok()"},{"line_number":757,"context_line":"        with self.get() as conn:"},{"line_number":758,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_f2b405f4","line":755,"in_reply_to":"1ae5cdf2_a12b11ea","updated":"2014-05-30 22:16:08.000000000","message":"I think the count is already doing the limit you want - do you want to ensure that count has to be \u003c some value of say... 10K - is that the coding bug you\u0027re worried about?\n\nI think reconciliation could happen on large databases, the reconciler_sync_point should be kept up close to the latest row_id though.\n\nWe have to take deletions - it\u0027s still a write.  If a tombstone gets dropped in the wrong storage policy we still need to apply it to the correct storage policy.  The get added into the reconciler queue with a different paramater that flags it for ensure_tombstone_in_the_right_location.\n\nthe index is the rowid when I did the explain - which seems pretty good.","commit_id":"ae977eae20ced6b93e644dc653870aca84dac633"},{"author":{"_account_id":5600,"name":"Brian Cline","email":"bcline@softlayer.com","username":"briancline"},"change_message_id":"f79c9fed1bbc9d4af03230c583157da28d4cd99f","unresolved":false,"context_lines":[{"line_number":460,"context_line":"    def has_misplaced_objects(self):"},{"line_number":461,"context_line":"        with self.get() as conn:"},{"line_number":462,"context_line":"            try:"},{"line_number":463,"context_line":"                curs \u003d conn.execute(\"\"\""},{"line_number":464,"context_line":"                    SELECT coalesce(max(object_count), 0) as count"},{"line_number":465,"context_line":"                    FROM policy_stat"},{"line_number":466,"context_line":"                    WHERE storage_policy_index \u003c\u003e ("}],"source_content_type":"text/x-python","patch_set":8,"id":"1ae5cdf2_8caeae2c","line":463,"updated":"2014-06-05 05:48:46.000000000","message":"So this is *super* minor, but any reason these blocks open with double quotes and the above ones (and others below) open with single quotes?","commit_id":"e1536f605f51eb2bb8423448a6d8752ba47fecfe"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"29212a43cbd0f6a171861d1e7adc0b47a58374f2","unresolved":false,"context_lines":[{"line_number":460,"context_line":"    def has_misplaced_objects(self):"},{"line_number":461,"context_line":"        with self.get() as conn:"},{"line_number":462,"context_line":"            try:"},{"line_number":463,"context_line":"                curs \u003d conn.execute(\"\"\""},{"line_number":464,"context_line":"                    SELECT coalesce(max(object_count), 0) as count"},{"line_number":465,"context_line":"                    FROM policy_stat"},{"line_number":466,"context_line":"                    WHERE storage_policy_index \u003c\u003e ("}],"source_content_type":"text/x-python","patch_set":8,"id":"1ae5cdf2_80a66fac","line":463,"in_reply_to":"1ae5cdf2_8caeae2c","updated":"2014-06-05 16:21:12.000000000","message":"written at different times and copyied from different places i\u0027d guess...\n\n#willfix","commit_id":"e1536f605f51eb2bb8423448a6d8752ba47fecfe"}],"swift/container/server.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"43874fcd1a22421057b0842dbf2e2c532b2321ae","unresolved":false,"context_lines":[{"line_number":58,"context_line":"            info.get(\u0027delete_timestamp\u0027, 0)),"},{"line_number":59,"context_line":"        \u0027X-Backend-Status-Changed-At\u0027: normalize_timestamp("},{"line_number":60,"context_line":"            info.get(\u0027status_changed_at\u0027, 0)),"},{"line_number":61,"context_line":"        POLICY_INDEX: info.get(\u0027storage_policy_index\u0027,"},{"line_number":62,"context_line":"                               POLICIES.default.idx),"},{"line_number":63,"context_line":"    }"},{"line_number":64,"context_line":"    if not is_deleted:"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_9113885b","line":61,"updated":"2014-06-10 15:50:12.000000000","message":"this results in X-Storage-Policy being returned to client even when container has been deleted which is (a) weird and (b) privacy leak because it reveals that the container has existed in the past. If it needs to be included here then it should be filtered in base.py GETorHEAD_base()","commit_id":"920d7124d146f9414780ab8fdec2d461550f6fe0"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"8aeb21bca68dabb9fd60a4e5af71ff604307581c","unresolved":false,"context_lines":[{"line_number":58,"context_line":"            info.get(\u0027delete_timestamp\u0027, 0)),"},{"line_number":59,"context_line":"        \u0027X-Backend-Status-Changed-At\u0027: normalize_timestamp("},{"line_number":60,"context_line":"            info.get(\u0027status_changed_at\u0027, 0)),"},{"line_number":61,"context_line":"        POLICY_INDEX: info.get(\u0027storage_policy_index\u0027,"},{"line_number":62,"context_line":"                               POLICIES.default.idx),"},{"line_number":63,"context_line":"    }"},{"line_number":64,"context_line":"    if not is_deleted:"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_d4b16202","line":61,"in_reply_to":"1ae5cdf2_9113885b","updated":"2014-06-11 07:58:54.000000000","message":"It\u0027s already a X-Backend header, so I don\u0027t wanna try and filter here - i\u0027ll see if I can fix the name translation code.","commit_id":"920d7124d146f9414780ab8fdec2d461550f6fe0"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"43874fcd1a22421057b0842dbf2e2c532b2321ae","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        except ValueError:"},{"line_number":149,"context_line":"            raise HTTPBadRequest("},{"line_number":150,"context_line":"                request\u003dreq, content_type\u003d\"text/plain\","},{"line_number":151,"context_line":"                body\u003d(\"Invalid X-Storage-Policy-Index %r\" % policy_index))"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"        pol \u003d POLICIES.get_by_index(policy_index)"},{"line_number":154,"context_line":"        if pol is None:"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_7addf96f","line":151,"updated":"2014-06-10 15:50:12.000000000","message":"nit: use constant i.e.  % (POLICY_INDEX, policy_index)","commit_id":"920d7124d146f9414780ab8fdec2d461550f6fe0"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"43874fcd1a22421057b0842dbf2e2c532b2321ae","unresolved":false,"context_lines":[{"line_number":154,"context_line":"        if pol is None:"},{"line_number":155,"context_line":"            raise HTTPBadRequest("},{"line_number":156,"context_line":"                request\u003dreq, content_type\u003d\"text/plain\","},{"line_number":157,"context_line":"                body\u003d(\"Invalid X-Storage-Policy-Index %r\" % policy_index))"},{"line_number":158,"context_line":"        return pol.idx"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    def account_update(self, req, account, container, broker):"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_9ad80581","line":157,"updated":"2014-06-10 15:50:12.000000000","message":"nit: use constant i.e.  % (POLICY_INDEX, policy_index)","commit_id":"920d7124d146f9414780ab8fdec2d461550f6fe0"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"43874fcd1a22421057b0842dbf2e2c532b2321ae","unresolved":false,"context_lines":[{"line_number":155,"context_line":"            raise HTTPBadRequest("},{"line_number":156,"context_line":"                request\u003dreq, content_type\u003d\"text/plain\","},{"line_number":157,"context_line":"                body\u003d(\"Invalid X-Storage-Policy-Index %r\" % policy_index))"},{"line_number":158,"context_line":"        return pol.idx"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    def account_update(self, req, account, container, broker):"},{"line_number":161,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_9af3a59e","line":158,"updated":"2014-06-10 15:50:12.000000000","message":"the two try/excepts could be simplified (i think):\n\n        try:\n            policy_index \u003d int(policy_index)\n            pol \u003d POLICIES.get_by_index(policy_index)\n            return pol.idx\n        except (ValueError, AttributeError):\n            raise HTTPBadRequest(\n                request\u003dreq, content_type\u003d\"text/plain\",\n                body\u003d(\"Invalid %s %r\" % (POLICY_INDEX, policy_index)))","commit_id":"920d7124d146f9414780ab8fdec2d461550f6fe0"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"8aeb21bca68dabb9fd60a4e5af71ff604307581c","unresolved":false,"context_lines":[{"line_number":155,"context_line":"            raise HTTPBadRequest("},{"line_number":156,"context_line":"                request\u003dreq, content_type\u003d\"text/plain\","},{"line_number":157,"context_line":"                body\u003d(\"Invalid X-Storage-Policy-Index %r\" % policy_index))"},{"line_number":158,"context_line":"        return pol.idx"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    def account_update(self, req, account, container, broker):"},{"line_number":161,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_f4849e0c","line":158,"in_reply_to":"1ae5cdf2_9af3a59e","updated":"2014-06-11 07:58:54.000000000","message":"meh, if i sneak an AttributeError get_by_index then it\u0027s a PITA to debug","commit_id":"920d7124d146f9414780ab8fdec2d461550f6fe0"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"43874fcd1a22421057b0842dbf2e2c532b2321ae","unresolved":false,"context_lines":[{"line_number":341,"context_line":"            if requested_policy_index is None:"},{"line_number":342,"context_line":"                # use the default index sent by the proxy if available"},{"line_number":343,"context_line":"                new_container_policy \u003d req.headers.get("},{"line_number":344,"context_line":"                    \u0027X-Backend-Storage-Policy-Default\u0027, int(POLICIES.default))"},{"line_number":345,"context_line":"            else:"},{"line_number":346,"context_line":"                new_container_policy \u003d requested_policy_index"},{"line_number":347,"context_line":"            created \u003d self._update_or_create(req, broker, timestamp,"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_f7d04455","line":344,"updated":"2014-06-10 15:50:12.000000000","message":"other policy headers are defined as a constants in storage_policy.py, \u0027X-Backend-Storage-Policy-Default\u0027 is odd one out.","commit_id":"920d7124d146f9414780ab8fdec2d461550f6fe0"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"43874fcd1a22421057b0842dbf2e2c532b2321ae","unresolved":false,"context_lines":[{"line_number":345,"context_line":"            else:"},{"line_number":346,"context_line":"                new_container_policy \u003d requested_policy_index"},{"line_number":347,"context_line":"            created \u003d self._update_or_create(req, broker, timestamp,"},{"line_number":348,"context_line":"                                             new_container_policy)"},{"line_number":349,"context_line":"            if requested_policy_index is not None and not created:"},{"line_number":350,"context_line":"                # validate requested policy with existing container"},{"line_number":351,"context_line":"                if requested_policy_index !\u003d broker.storage_policy_index:"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_c690f897","line":348,"updated":"2014-06-10 15:50:12.000000000","message":"put_timestamp gets updated in _update_or_create even though we may return HTTPConflict due to policy mismatch - is that ok?","commit_id":"920d7124d146f9414780ab8fdec2d461550f6fe0"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"8aeb21bca68dabb9fd60a4e5af71ff604307581c","unresolved":false,"context_lines":[{"line_number":345,"context_line":"            else:"},{"line_number":346,"context_line":"                new_container_policy \u003d requested_policy_index"},{"line_number":347,"context_line":"            created \u003d self._update_or_create(req, broker, timestamp,"},{"line_number":348,"context_line":"                                             new_container_policy)"},{"line_number":349,"context_line":"            if requested_policy_index is not None and not created:"},{"line_number":350,"context_line":"                # validate requested policy with existing container"},{"line_number":351,"context_line":"                if requested_policy_index !\u003d broker.storage_policy_index:"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_54ef12b1","line":348,"in_reply_to":"1ae5cdf2_c690f897","updated":"2014-06-11 07:58:54.000000000","message":"Done","commit_id":"920d7124d146f9414780ab8fdec2d461550f6fe0"}],"swift/proxy/controllers/base.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"43874fcd1a22421057b0842dbf2e2c532b2321ae","unresolved":false,"context_lines":[{"line_number":1204,"context_line":"            pass"},{"line_number":1205,"context_line":"        # if a backend policy index is present in resp headers, translate it"},{"line_number":1206,"context_line":"        # here with the friendly policy name"},{"line_number":1207,"context_line":"        if POLICY_INDEX in res.headers:"},{"line_number":1208,"context_line":"            policy \u003d POLICIES.get_by_index(res.headers[POLICY_INDEX])"},{"line_number":1209,"context_line":"            if policy:"},{"line_number":1210,"context_line":"                res.headers[POLICY] \u003d policy.name"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_40876bd7","line":1207,"updated":"2014-06-10 15:50:12.000000000","message":"should only do this if 2xx status code? backend returns POLICY_INDEX with 404s but shouldn;t let that leak out to clients","commit_id":"920d7124d146f9414780ab8fdec2d461550f6fe0"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"8aeb21bca68dabb9fd60a4e5af71ff604307581c","unresolved":false,"context_lines":[{"line_number":1204,"context_line":"            pass"},{"line_number":1205,"context_line":"        # if a backend policy index is present in resp headers, translate it"},{"line_number":1206,"context_line":"        # here with the friendly policy name"},{"line_number":1207,"context_line":"        if POLICY_INDEX in res.headers:"},{"line_number":1208,"context_line":"            policy \u003d POLICIES.get_by_index(res.headers[POLICY_INDEX])"},{"line_number":1209,"context_line":"            if policy:"},{"line_number":1210,"context_line":"                res.headers[POLICY] \u003d policy.name"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_bf9bcf16","line":1207,"in_reply_to":"1ae5cdf2_40876bd7","updated":"2014-06-11 07:58:54.000000000","message":"Done","commit_id":"920d7124d146f9414780ab8fdec2d461550f6fe0"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"43874fcd1a22421057b0842dbf2e2c532b2321ae","unresolved":false,"context_lines":[{"line_number":1207,"context_line":"        if POLICY_INDEX in res.headers:"},{"line_number":1208,"context_line":"            policy \u003d POLICIES.get_by_index(res.headers[POLICY_INDEX])"},{"line_number":1209,"context_line":"            if policy:"},{"line_number":1210,"context_line":"                res.headers[POLICY] \u003d policy.name"},{"line_number":1211,"context_line":"        return res"},{"line_number":1212,"context_line":""},{"line_number":1213,"context_line":"    def is_origin_allowed(self, cors_info, origin):"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_917c6822","line":1210,"updated":"2014-06-10 15:50:12.000000000","message":"else:\n      ???\n\nShouldn\u0027t we somehow be indicating to the client that a policy is set e.g. by returning the index if no name can be resolved?\n\nIf the index is returned at least user could figure out which policy got deleted from config that is still in use, or could manually patch up swift.conf with a policy section for that index.","commit_id":"920d7124d146f9414780ab8fdec2d461550f6fe0"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"8aeb21bca68dabb9fd60a4e5af71ff604307581c","unresolved":false,"context_lines":[{"line_number":1207,"context_line":"        if POLICY_INDEX in res.headers:"},{"line_number":1208,"context_line":"            policy \u003d POLICIES.get_by_index(res.headers[POLICY_INDEX])"},{"line_number":1209,"context_line":"            if policy:"},{"line_number":1210,"context_line":"                res.headers[POLICY] \u003d policy.name"},{"line_number":1211,"context_line":"        return res"},{"line_number":1212,"context_line":""},{"line_number":1213,"context_line":"    def is_origin_allowed(self, cors_info, origin):"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_3ac26d85","line":1210,"in_reply_to":"1ae5cdf2_917c6822","updated":"2014-06-11 07:58:54.000000000","message":"I don\u0027t want to leak the index to the api and there\u0027s nothing the client can really do - so I don\u0027t think there\u0027s anything to include in the response.  But it\u0027s definitely a configuration error - i\u0027ll log as such.","commit_id":"920d7124d146f9414780ab8fdec2d461550f6fe0"}],"swift/proxy/controllers/container.py":[{"author":{"_account_id":917,"name":"Chuck Thier","email":"cthier@gmail.com","username":"cthier"},"change_message_id":"ccb4aa5896324ff87fea0e8c3785e215e166fad5","unresolved":false,"context_lines":[{"line_number":48,"context_line":"                \u0027x-remove-%s-write\u0027 % st,"},{"line_number":49,"context_line":"                \u0027x-remove-versions-location\u0027]"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    def _convert_policy_to_index(self, req):"},{"line_number":52,"context_line":"        \"\"\""},{"line_number":53,"context_line":"        Helper method to convert a policy name (from a request from a client)"},{"line_number":54,"context_line":"        to a policy index (for a request to a backend)."}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_6e5bbb54","line":51,"updated":"2014-05-30 18:23:15.000000000","message":"seems like a method like this should be in swift.common.storage_policy","commit_id":"ae977eae20ced6b93e644dc653870aca84dac633"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"b71e6a47d310a196130764cd330bac242b96023a","unresolved":false,"context_lines":[{"line_number":48,"context_line":"                \u0027x-remove-%s-write\u0027 % st,"},{"line_number":49,"context_line":"                \u0027x-remove-versions-location\u0027]"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    def _convert_policy_to_index(self, req):"},{"line_number":52,"context_line":"        \"\"\""},{"line_number":53,"context_line":"        Helper method to convert a policy name (from a request from a client)"},{"line_number":54,"context_line":"        to a policy index (for a request to a backend)."}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_d2a629c1","line":51,"in_reply_to":"1ae5cdf2_6e5bbb54","updated":"2014-05-30 22:16:08.000000000","message":"with the HTTP bit and everything?  The container server is the only place where None get\u0027s translated to default - for container create - everyone else defaults None to 0 - so it\u0027s a little bit different and sort of specific to the container controller IMHO.","commit_id":"ae977eae20ced6b93e644dc653870aca84dac633"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"d94b8d831ea76778bfced36d76d9e6e39722da52","unresolved":false,"context_lines":[{"line_number":63,"context_line":"            raise HTTPBadRequest(request\u003dreq,"},{"line_number":64,"context_line":"                                 content_type\u003d\"text/plain\","},{"line_number":65,"context_line":"                                 body\u003d(\"Invalid X-Storage-Policy \u0027%s\u0027\""},{"line_number":66,"context_line":"                                       % policy_name))"},{"line_number":67,"context_line":"        if policy.is_deprecated:"},{"line_number":68,"context_line":"            body \u003d \u0027Storage Policy %r is deprecated\u0027 % (policy.name)"},{"line_number":69,"context_line":"            raise HTTPBadRequest(request\u003dreq, body\u003dbody)"}],"source_content_type":"text/x-python","patch_set":8,"id":"1ae5cdf2_fee52209","line":66,"updated":"2014-06-04 19:51:14.000000000","message":"% (POLICY, policy_name) perhaps","commit_id":"e1536f605f51eb2bb8423448a6d8752ba47fecfe"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"ef8c17350d247bdeb0b55292e7aef21a83502001","unresolved":false,"context_lines":[{"line_number":63,"context_line":"            raise HTTPBadRequest(request\u003dreq,"},{"line_number":64,"context_line":"                                 content_type\u003d\"text/plain\","},{"line_number":65,"context_line":"                                 body\u003d(\"Invalid X-Storage-Policy \u0027%s\u0027\""},{"line_number":66,"context_line":"                                       % policy_name))"},{"line_number":67,"context_line":"        if policy.is_deprecated:"},{"line_number":68,"context_line":"            body \u003d \u0027Storage Policy %r is deprecated\u0027 % (policy.name)"},{"line_number":69,"context_line":"            raise HTTPBadRequest(request\u003dreq, body\u003dbody)"}],"source_content_type":"text/x-python","patch_set":8,"id":"1ae5cdf2_3446cb4f","line":66,"in_reply_to":"1ae5cdf2_fee52209","updated":"2014-06-04 20:33:15.000000000","message":"Done","commit_id":"e1536f605f51eb2bb8423448a6d8752ba47fecfe"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"43874fcd1a22421057b0842dbf2e2c532b2321ae","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        if policy.is_deprecated:"},{"line_number":68,"context_line":"            body \u003d \u0027Storage Policy %r is deprecated\u0027 % (policy.name)"},{"line_number":69,"context_line":"            raise HTTPBadRequest(request\u003dreq, body\u003dbody)"},{"line_number":70,"context_line":"        return int(policy)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def clean_acls(self, req):"},{"line_number":73,"context_line":"        if \u0027swift.clean_acl\u0027 in req.environ:"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_77db54ed","line":70,"updated":"2014-06-10 15:50:12.000000000","message":"nit: this is cool, but policy.idx might be more intuitive? and consistent with container.server.get_and_validate_policy_index()","commit_id":"920d7124d146f9414780ab8fdec2d461550f6fe0"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"8aeb21bca68dabb9fd60a4e5af71ff604307581c","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        if policy.is_deprecated:"},{"line_number":68,"context_line":"            body \u003d \u0027Storage Policy %r is deprecated\u0027 % (policy.name)"},{"line_number":69,"context_line":"            raise HTTPBadRequest(request\u003dreq, body\u003dbody)"},{"line_number":70,"context_line":"        return int(policy)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def clean_acls(self, req):"},{"line_number":73,"context_line":"        if \u0027swift.clean_acl\u0027 in req.environ:"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_5ac5795a","line":70,"in_reply_to":"1ae5cdf2_77db54ed","updated":"2014-06-11 07:58:54.000000000","message":"hrmm... i don\u0027t know about intuitive, but as for consistency i updated the other method.","commit_id":"920d7124d146f9414780ab8fdec2d461550f6fe0"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"43874fcd1a22421057b0842dbf2e2c532b2321ae","unresolved":false,"context_lines":[{"line_number":178,"context_line":"        container_partition, containers \u003d self.app.container_ring.get_nodes("},{"line_number":179,"context_line":"            self.account_name, self.container_name)"},{"line_number":180,"context_line":"        headers \u003d self.generate_request_headers("},{"line_number":181,"context_line":"            req, transfer\u003dTrue)"},{"line_number":182,"context_line":"        clear_info_cache(self.app, req.environ,"},{"line_number":183,"context_line":"                         self.account_name, self.container_name)"},{"line_number":184,"context_line":"        resp \u003d self.make_requests("}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_f39219f5","line":181,"updated":"2014-06-10 15:50:12.000000000","message":"nit: looks like an unnecessary change crept in here","commit_id":"920d7124d146f9414780ab8fdec2d461550f6fe0"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"8aeb21bca68dabb9fd60a4e5af71ff604307581c","unresolved":false,"context_lines":[{"line_number":178,"context_line":"        container_partition, containers \u003d self.app.container_ring.get_nodes("},{"line_number":179,"context_line":"            self.account_name, self.container_name)"},{"line_number":180,"context_line":"        headers \u003d self.generate_request_headers("},{"line_number":181,"context_line":"            req, transfer\u003dTrue)"},{"line_number":182,"context_line":"        clear_info_cache(self.app, req.environ,"},{"line_number":183,"context_line":"                         self.account_name, self.container_name)"},{"line_number":184,"context_line":"        resp \u003d self.make_requests("}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_9a89c128","line":181,"in_reply_to":"1ae5cdf2_f39219f5","updated":"2014-06-11 07:58:54.000000000","message":"Done","commit_id":"920d7124d146f9414780ab8fdec2d461550f6fe0"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"43874fcd1a22421057b0842dbf2e2c532b2321ae","unresolved":false,"context_lines":[{"line_number":211,"context_line":"    def _backend_requests(self, req, n_outgoing, account_partition, accounts,"},{"line_number":212,"context_line":"                          policy_index\u003dNone):"},{"line_number":213,"context_line":"        additional \u003d {\u0027X-Timestamp\u0027: normalize_timestamp(time.time())}"},{"line_number":214,"context_line":"        if policy_index is None:"},{"line_number":215,"context_line":"            additional[\u0027X-Backend-Storage-Policy-Default\u0027] \u003d \\"},{"line_number":216,"context_line":"                int(POLICIES.default)"},{"line_number":217,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_b7f15ccf","line":214,"updated":"2014-06-10 15:50:12.000000000","message":"is sending \u0027X-Backend-Storage-Policy-Default\u0027 redundant? backend seems to do the same if receiving no policy index","commit_id":"920d7124d146f9414780ab8fdec2d461550f6fe0"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"8aeb21bca68dabb9fd60a4e5af71ff604307581c","unresolved":false,"context_lines":[{"line_number":211,"context_line":"    def _backend_requests(self, req, n_outgoing, account_partition, accounts,"},{"line_number":212,"context_line":"                          policy_index\u003dNone):"},{"line_number":213,"context_line":"        additional \u003d {\u0027X-Timestamp\u0027: normalize_timestamp(time.time())}"},{"line_number":214,"context_line":"        if policy_index is None:"},{"line_number":215,"context_line":"            additional[\u0027X-Backend-Storage-Policy-Default\u0027] \u003d \\"},{"line_number":216,"context_line":"                int(POLICIES.default)"},{"line_number":217,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_5ac1f92d","line":214,"in_reply_to":"1ae5cdf2_b7f15ccf","updated":"2014-06-11 07:58:54.000000000","message":"no, the backend will use X-Backend-Storage-Policy-Default over it\u0027s own POLICIES.default if the header is included in the request to ensure that there\u0027s a serial decision about the default storage policy during a roll-out of an updated swift.conf","commit_id":"920d7124d146f9414780ab8fdec2d461550f6fe0"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"43874fcd1a22421057b0842dbf2e2c532b2321ae","unresolved":false,"context_lines":[{"line_number":212,"context_line":"                          policy_index\u003dNone):"},{"line_number":213,"context_line":"        additional \u003d {\u0027X-Timestamp\u0027: normalize_timestamp(time.time())}"},{"line_number":214,"context_line":"        if policy_index is None:"},{"line_number":215,"context_line":"            additional[\u0027X-Backend-Storage-Policy-Default\u0027] \u003d \\"},{"line_number":216,"context_line":"                int(POLICIES.default)"},{"line_number":217,"context_line":"        else:"},{"line_number":218,"context_line":"            additional[POLICY_INDEX] \u003d str(policy_index)"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_b755dcc7","line":215,"updated":"2014-06-10 15:50:12.000000000","message":"other policy headers are defined as a constants in storage_policy.py, \u0027X-Backend-Storage-Policy-Default\u0027 is odd one out.","commit_id":"920d7124d146f9414780ab8fdec2d461550f6fe0"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"8aeb21bca68dabb9fd60a4e5af71ff604307581c","unresolved":false,"context_lines":[{"line_number":212,"context_line":"                          policy_index\u003dNone):"},{"line_number":213,"context_line":"        additional \u003d {\u0027X-Timestamp\u0027: normalize_timestamp(time.time())}"},{"line_number":214,"context_line":"        if policy_index is None:"},{"line_number":215,"context_line":"            additional[\u0027X-Backend-Storage-Policy-Default\u0027] \u003d \\"},{"line_number":216,"context_line":"                int(POLICIES.default)"},{"line_number":217,"context_line":"        else:"},{"line_number":218,"context_line":"            additional[POLICY_INDEX] \u003d str(policy_index)"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_9ade2110","line":215,"in_reply_to":"1ae5cdf2_b755dcc7","updated":"2014-06-11 07:58:54.000000000","message":"yeah, i really should fix those other ones ;)","commit_id":"920d7124d146f9414780ab8fdec2d461550f6fe0"}],"test/unit/container/test_server.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"43874fcd1a22421057b0842dbf2e2c532b2321ae","unresolved":false,"context_lines":[{"line_number":197,"context_line":"        self.assertEqual(response.headers[\u0027x-backend-delete-timestamp\u0027],"},{"line_number":198,"context_line":"                         normalize_timestamp(0))"},{"line_number":199,"context_line":"        self.assertEqual(response.headers[\u0027x-backend-status-changed-at\u0027],"},{"line_number":200,"context_line":"                         normalize_timestamp(start))"},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"    def test_HEAD_not_found(self):"},{"line_number":203,"context_line":"        req \u003d Request.blank(\u0027/sda1/p/a/c\u0027, method\u003d\u0027HEAD\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_c071bb45","line":200,"updated":"2014-06-10 15:50:12.000000000","message":"add test for x-backend-storage-policy-index","commit_id":"920d7124d146f9414780ab8fdec2d461550f6fe0"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"8aeb21bca68dabb9fd60a4e5af71ff604307581c","unresolved":false,"context_lines":[{"line_number":197,"context_line":"        self.assertEqual(response.headers[\u0027x-backend-delete-timestamp\u0027],"},{"line_number":198,"context_line":"                         normalize_timestamp(0))"},{"line_number":199,"context_line":"        self.assertEqual(response.headers[\u0027x-backend-status-changed-at\u0027],"},{"line_number":200,"context_line":"                         normalize_timestamp(start))"},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"    def test_HEAD_not_found(self):"},{"line_number":203,"context_line":"        req \u003d Request.blank(\u0027/sda1/p/a/c\u0027, method\u003d\u0027HEAD\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_fa0e458b","line":200,"in_reply_to":"1ae5cdf2_c071bb45","updated":"2014-06-11 07:58:54.000000000","message":"Done","commit_id":"920d7124d146f9414780ab8fdec2d461550f6fe0"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"43874fcd1a22421057b0842dbf2e2c532b2321ae","unresolved":false,"context_lines":[{"line_number":210,"context_line":"        self.assertEqual(resp.headers[\u0027x-backend-status-changed-at\u0027],"},{"line_number":211,"context_line":"                         normalize_timestamp(0))"},{"line_number":212,"context_line":"        self.assertEqual(resp.headers[\u0027x-backend-delete-timestamp\u0027],"},{"line_number":213,"context_line":"                         normalize_timestamp(0))"},{"line_number":214,"context_line":"        for header in (\u0027x-container-object-count\u0027, \u0027x-container-bytes-used\u0027,"},{"line_number":215,"context_line":"                       \u0027x-timestamp\u0027, \u0027x-put-timestamp\u0027):"},{"line_number":216,"context_line":"            self.assertEqual(resp.headers[header], None)"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_0093a34f","line":213,"updated":"2014-06-10 15:50:12.000000000","message":"add test for x-backend-storage-policy-index","commit_id":"920d7124d146f9414780ab8fdec2d461550f6fe0"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"8aeb21bca68dabb9fd60a4e5af71ff604307581c","unresolved":false,"context_lines":[{"line_number":210,"context_line":"        self.assertEqual(resp.headers[\u0027x-backend-status-changed-at\u0027],"},{"line_number":211,"context_line":"                         normalize_timestamp(0))"},{"line_number":212,"context_line":"        self.assertEqual(resp.headers[\u0027x-backend-delete-timestamp\u0027],"},{"line_number":213,"context_line":"                         normalize_timestamp(0))"},{"line_number":214,"context_line":"        for header in (\u0027x-container-object-count\u0027, \u0027x-container-bytes-used\u0027,"},{"line_number":215,"context_line":"                       \u0027x-timestamp\u0027, \u0027x-put-timestamp\u0027):"},{"line_number":216,"context_line":"            self.assertEqual(resp.headers[header], None)"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_1a277113","line":213,"in_reply_to":"1ae5cdf2_0093a34f","updated":"2014-06-11 07:58:54.000000000","message":"Done","commit_id":"920d7124d146f9414780ab8fdec2d461550f6fe0"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"43874fcd1a22421057b0842dbf2e2c532b2321ae","unresolved":false,"context_lines":[{"line_number":241,"context_line":"            self.assertEqual(resp.headers[\u0027x-backend-delete-timestamp\u0027],"},{"line_number":242,"context_line":"                             request_method_times[\u0027DELETE\u0027])"},{"line_number":243,"context_line":"            self.assertEqual(resp.headers[\u0027x-backend-status-changed-at\u0027],"},{"line_number":244,"context_line":"                             request_method_times[\u0027DELETE\u0027])"},{"line_number":245,"context_line":"            for header in (\u0027x-container-object-count\u0027,"},{"line_number":246,"context_line":"                           \u0027x-container-bytes-used\u0027, \u0027x-timestamp\u0027,"},{"line_number":247,"context_line":"                           \u0027x-put-timestamp\u0027):"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_c0a8db79","line":244,"updated":"2014-06-10 15:50:12.000000000","message":"add test for x-backend-storage-policy-index","commit_id":"920d7124d146f9414780ab8fdec2d461550f6fe0"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"8aeb21bca68dabb9fd60a4e5af71ff604307581c","unresolved":false,"context_lines":[{"line_number":241,"context_line":"            self.assertEqual(resp.headers[\u0027x-backend-delete-timestamp\u0027],"},{"line_number":242,"context_line":"                             request_method_times[\u0027DELETE\u0027])"},{"line_number":243,"context_line":"            self.assertEqual(resp.headers[\u0027x-backend-status-changed-at\u0027],"},{"line_number":244,"context_line":"                             request_method_times[\u0027DELETE\u0027])"},{"line_number":245,"context_line":"            for header in (\u0027x-container-object-count\u0027,"},{"line_number":246,"context_line":"                           \u0027x-container-bytes-used\u0027, \u0027x-timestamp\u0027,"},{"line_number":247,"context_line":"                           \u0027x-put-timestamp\u0027):"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_5a7499fd","line":244,"in_reply_to":"1ae5cdf2_c0a8db79","updated":"2014-06-11 07:58:54.000000000","message":"Done","commit_id":"920d7124d146f9414780ab8fdec2d461550f6fe0"}],"test/unit/proxy/controllers/test_container.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"d8997660854241c638c1ae31a72ee043916d4340","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        self.app \u003d proxy_server.Application(None, FakeMemcache(),"},{"line_number":35,"context_line":"                                            account_ring\u003dFakeRing(),"},{"line_number":36,"context_line":"                                            container_ring\u003dFakeRing(),"},{"line_number":37,"context_line":"                                            object_ring\u003dFakeRing())"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def test_container_info_in_response_env(self):"},{"line_number":40,"context_line":"        controller \u003d proxy_server.ContainerController(self.app, \u0027a\u0027, \u0027c\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3ae8d1ca_4c85ebce","line":37,"updated":"2014-05-29 11:23:23.000000000","message":"passing object_ring here is causing unit test to fail further up dependency chain https://review.openstack.org/#/c/96030/2","commit_id":"b75a49a16552d909a7287d8ee2c4436ff0adff4b"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"215ba5610bc7f1594c4fbf3859557eb0722b6ef6","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        self.app \u003d proxy_server.Application(None, FakeMemcache(),"},{"line_number":35,"context_line":"                                            account_ring\u003dFakeRing(),"},{"line_number":36,"context_line":"                                            container_ring\u003dFakeRing(),"},{"line_number":37,"context_line":"                                            object_ring\u003dFakeRing())"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def test_container_info_in_response_env(self):"},{"line_number":40,"context_line":"        controller \u003d proxy_server.ContainerController(self.app, \u0027a\u0027, \u0027c\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3ae8d1ca_95ab6f1c","line":37,"in_reply_to":"3ae8d1ca_0ddf5d0e","updated":"2014-05-29 14:26:14.000000000","message":"must be a copy n paste or merge error, we got rid of this parm a long, long time ago","commit_id":"b75a49a16552d909a7287d8ee2c4436ff0adff4b"},{"author":{"_account_id":1216,"name":"gholt","email":"z-launchpad@brim.net","username":"gholt"},"change_message_id":"8131fa00b9d68516eb37d2d3ae44f6cd6dedccdc","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        self.app \u003d proxy_server.Application(None, FakeMemcache(),"},{"line_number":35,"context_line":"                                            account_ring\u003dFakeRing(),"},{"line_number":36,"context_line":"                                            container_ring\u003dFakeRing(),"},{"line_number":37,"context_line":"                                            object_ring\u003dFakeRing())"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def test_container_info_in_response_env(self):"},{"line_number":40,"context_line":"        controller \u003d proxy_server.ContainerController(self.app, \u0027a\u0027, \u0027c\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3ae8d1ca_0ddf5d0e","line":37,"in_reply_to":"3ae8d1ca_4c85ebce","updated":"2014-05-29 13:01:29.000000000","message":"Same here. 4 failed because swift.proxy.server.Application does not take an object_ring kwarg atm.","commit_id":"b75a49a16552d909a7287d8ee2c4436ff0adff4b"}],"test/unit/proxy/test_server.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"43874fcd1a22421057b0842dbf2e2c532b2321ae","unresolved":false,"context_lines":[{"line_number":4360,"context_line":"                    if not requested_policy:"},{"line_number":4361,"context_line":"                        self.assertFalse(POLICY_INDEX in headers)"},{"line_number":4362,"context_line":"                        self.assertTrue("},{"line_number":4363,"context_line":"                            \u0027X-Backend-Storage-Policy-Default\u0027 in headers)"},{"line_number":4364,"context_line":"                        self.assertEqual("},{"line_number":4365,"context_line":"                            int(expected_policy),"},{"line_number":4366,"context_line":"                            int(headers[\u0027X-Backend-Storage-Policy-Default\u0027]))"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_e3e9611b","line":4363,"updated":"2014-06-10 15:50:12.000000000","message":"make this a constant like other policy headers","commit_id":"920d7124d146f9414780ab8fdec2d461550f6fe0"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"43874fcd1a22421057b0842dbf2e2c532b2321ae","unresolved":false,"context_lines":[{"line_number":4363,"context_line":"                            \u0027X-Backend-Storage-Policy-Default\u0027 in headers)"},{"line_number":4364,"context_line":"                        self.assertEqual("},{"line_number":4365,"context_line":"                            int(expected_policy),"},{"line_number":4366,"context_line":"                            int(headers[\u0027X-Backend-Storage-Policy-Default\u0027]))"},{"line_number":4367,"context_line":"                    else:"},{"line_number":4368,"context_line":"                        self.assertTrue(POLICY_INDEX in headers)"},{"line_number":4369,"context_line":"                        self.assertEqual(int(headers[POLICY_INDEX]),"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_83d89d80","line":4366,"updated":"2014-06-10 15:50:12.000000000","message":"ditto","commit_id":"920d7124d146f9414780ab8fdec2d461550f6fe0"}]}
