)]}'
{"swift/account/backend.py":[{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"e6b5af23d67bdb2f0d3dee020d8e8cb130677a09","unresolved":false,"context_lines":[{"line_number":205,"context_line":"    def _commit_puts_load(self, item_list, entry):"},{"line_number":206,"context_line":"        \"\"\"See :func:`swift.common.db.DatabaseBroker._commit_puts_load`\"\"\""},{"line_number":207,"context_line":"        loaded \u003d pickle.loads(entry.decode(\u0027base64\u0027))"},{"line_number":208,"context_line":"        # check to see if the udpate includes policy_index or not"},{"line_number":209,"context_line":"        if len(loaded) \u003d\u003d 6:"},{"line_number":210,"context_line":"            (name, put_timestamp, delete_timestamp, object_count, bytes_used,"},{"line_number":211,"context_line":"             deleted) \u003d loaded"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAVn%2F%2F2oA%3D","line":208,"updated":"2014-03-03 20:07:23.000000000","message":"udpate -\u003e update","commit_id":"6e0220ea80611e8da456c1e0ed02074934ac6ac3"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"ed0da77152f5afeb533304a8e15df5efe8ccc7a2","unresolved":false,"context_lines":[{"line_number":205,"context_line":"    def _commit_puts_load(self, item_list, entry):"},{"line_number":206,"context_line":"        \"\"\"See :func:`swift.common.db.DatabaseBroker._commit_puts_load`\"\"\""},{"line_number":207,"context_line":"        loaded \u003d pickle.loads(entry.decode(\u0027base64\u0027))"},{"line_number":208,"context_line":"        # check to see if the udpate includes policy_index or not"},{"line_number":209,"context_line":"        if len(loaded) \u003d\u003d 6:"},{"line_number":210,"context_line":"            (name, put_timestamp, delete_timestamp, object_count, bytes_used,"},{"line_number":211,"context_line":"             deleted) \u003d loaded"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAVn%2F%2FrqI%3D","line":208,"in_reply_to":"AAAAVn%2F%2F2oA%3D","updated":"2014-03-04 17:56:33.000000000","message":"hmm, maybe I have a defective keyboard or something.  heh","commit_id":"6e0220ea80611e8da456c1e0ed02074934ac6ac3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"e6b5af23d67bdb2f0d3dee020d8e8cb130677a09","unresolved":false,"context_lines":[{"line_number":246,"context_line":"            return (row[0] \u003d\u003d 0)"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"    def put_container(self, name, put_timestamp, delete_timestamp,"},{"line_number":249,"context_line":"                      object_count, bytes_used, storage_policy_index):"},{"line_number":250,"context_line":"        \"\"\""},{"line_number":251,"context_line":"        Create a container with the given attributes."},{"line_number":252,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAVn%2F%2F2gE%3D","line":249,"updated":"2014-03-03 20:07:23.000000000","message":"What about a default storage_policy_index? Maybe POLICIES.get_default().idx if None? In that case no changes to existing test code is required.","commit_id":"6e0220ea80611e8da456c1e0ed02074934ac6ac3"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"ed0da77152f5afeb533304a8e15df5efe8ccc7a2","unresolved":false,"context_lines":[{"line_number":246,"context_line":"            return (row[0] \u003d\u003d 0)"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"    def put_container(self, name, put_timestamp, delete_timestamp,"},{"line_number":249,"context_line":"                      object_count, bytes_used, storage_policy_index):"},{"line_number":250,"context_line":"        \"\"\""},{"line_number":251,"context_line":"        Create a container with the given attributes."},{"line_number":252,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAVn%2F%2Frhs%3D","line":249,"in_reply_to":"AAAAVn%2F%2F2gE%3D","updated":"2014-03-04 17:56:33.000000000","message":"So the reason I didn\u0027t put a default here is to assure that callers (as far as I can tell only the PUT method of the account backend) always provide it.  The storage nodes, by design with the policy implementation, should always get a header with a policy index set or there\u0027s a bug somewhere.  The index is converted at the proxy from either the container settings or default in the event that the container was created before policies existed.  If we use defaults at the storage nodes then we could mask errors elsewhere.  That said, I did have to use default values in some earlier patches because there were related patches that weren\u0027t done yet but everything on the EC branch (entry point) should require a policy index header.  I may go double check this though and make sure nothing snuck through, thanks for the comment!","commit_id":"6e0220ea80611e8da456c1e0ed02074934ac6ac3"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"5e3ae412a1400aa28abd44f7d6c4c4572647a750","unresolved":false,"context_lines":[{"line_number":123,"context_line":"                                    old.object_count || \u0027-\u0027 || old.bytes_used);"},{"line_number":124,"context_line":"            END;"},{"line_number":125,"context_line":"            %s"},{"line_number":126,"context_line":"        \"\"\" % POLICY_STAT_TRIGGER_SCRIPT)"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"    def create_account_stat_table(self, conn, put_timestamp):"},{"line_number":129,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAWH%2F%2FBiI%3D","line":126,"updated":"2014-03-20 21:44:04.000000000","message":"I think just a + here would be better","commit_id":"29079ec1f808ddc1e69d13ba99f92b3a70dd7698"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"049da864798578175cb6812ff5df51772242249f","unresolved":false,"context_lines":[{"line_number":123,"context_line":"                                    old.object_count || \u0027-\u0027 || old.bytes_used);"},{"line_number":124,"context_line":"            END;"},{"line_number":125,"context_line":"            %s"},{"line_number":126,"context_line":"        \"\"\" % POLICY_STAT_TRIGGER_SCRIPT)"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"    def create_account_stat_table(self, conn, put_timestamp):"},{"line_number":129,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAWH%2F%2FBLE%3D","line":126,"updated":"2014-03-20 22:25:48.000000000","message":"not sure exactly what you mean?","commit_id":"29079ec1f808ddc1e69d13ba99f92b3a70dd7698"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"828113a42903dc6cd923c8441f545284aa50fd91","unresolved":false,"context_lines":[{"line_number":123,"context_line":"                                    old.object_count || \u0027-\u0027 || old.bytes_used);"},{"line_number":124,"context_line":"            END;"},{"line_number":125,"context_line":"            %s"},{"line_number":126,"context_line":"        \"\"\" % POLICY_STAT_TRIGGER_SCRIPT)"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"    def create_account_stat_table(self, conn, put_timestamp):"},{"line_number":129,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAWH%2F%2B76A%3D","line":126,"in_reply_to":"AAAAWH%2F%2FBLE%3D","updated":"2014-03-21 15:16:46.000000000","message":"Done","commit_id":"29079ec1f808ddc1e69d13ba99f92b3a70dd7698"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"5e3ae412a1400aa28abd44f7d6c4c4572647a750","unresolved":false,"context_lines":[{"line_number":177,"context_line":"        for pol in POLICIES:"},{"line_number":178,"context_line":"            conn.executescript(\"\"\""},{"line_number":179,"context_line":"                INSERT INTO policy_stat VALUES(%s, 0, 0);"},{"line_number":180,"context_line":"            \"\"\" % pol.idx)"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"    def get_db_version(self, conn):"},{"line_number":183,"context_line":"        if self._db_version \u003d\u003d -1:"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAWH%2F%2FBgg%3D","line":180,"updated":"2014-03-20 21:44:04.000000000","message":"And when a new policy is added it\u0027s not reported until it used right?  Do they ever get reaped?","commit_id":"29079ec1f808ddc1e69d13ba99f92b3a70dd7698"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"049da864798578175cb6812ff5df51772242249f","unresolved":false,"context_lines":[{"line_number":177,"context_line":"        for pol in POLICIES:"},{"line_number":178,"context_line":"            conn.executescript(\"\"\""},{"line_number":179,"context_line":"                INSERT INTO policy_stat VALUES(%s, 0, 0);"},{"line_number":180,"context_line":"            \"\"\" % pol.idx)"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"    def get_db_version(self, conn):"},{"line_number":183,"context_line":"        if self._db_version \u003d\u003d -1:"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAWH%2F%2FBLQ%3D","line":180,"in_reply_to":"AAAAWH%2F%2FBgg%3D","updated":"2014-03-20 22:25:48.000000000","message":"yes, they get added - that\u0027s what POLICY_STAT_TRIGGER_SCRIPT does. They do not, however, get reaped as we don\u0027t support deleting policies at the moment.  There\u0027s some discussion on the topic on Trello","commit_id":"29079ec1f808ddc1e69d13ba99f92b3a70dd7698"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"5e3ae412a1400aa28abd44f7d6c4c4572647a750","unresolved":false,"context_lines":[{"line_number":216,"context_line":"                with self.get() as conn:"},{"line_number":217,"context_line":"                    storage_policy_index \u003d conn.execute("},{"line_number":218,"context_line":"                        \u0027SELECT storage_policy_index from account_stat\u0027"},{"line_number":219,"context_line":"                    ).fetchone()[0]"},{"line_number":220,"context_line":"            except sqlite3.OperationalError as err:"},{"line_number":221,"context_line":"                if \"no such column \u0027storage_policy_index\u0027\" not in str(err):"},{"line_number":222,"context_line":"                    raise"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAWH%2F%2FBXY%3D","line":219,"updated":"2014-03-20 21:44:04.000000000","message":"wait, wat?  If the server didn\u0027t send the policy_index then we *KNOW* it\u0027s 0 - no need to go looking for anything in the database - why does the account_stat table even have a storage_policy_index?  I don\u0027t see where account_stat is ever ALTER\u0027d","commit_id":"29079ec1f808ddc1e69d13ba99f92b3a70dd7698"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"828113a42903dc6cd923c8441f545284aa50fd91","unresolved":false,"context_lines":[{"line_number":216,"context_line":"                with self.get() as conn:"},{"line_number":217,"context_line":"                    storage_policy_index \u003d conn.execute("},{"line_number":218,"context_line":"                        \u0027SELECT storage_policy_index from account_stat\u0027"},{"line_number":219,"context_line":"                    ).fetchone()[0]"},{"line_number":220,"context_line":"            except sqlite3.OperationalError as err:"},{"line_number":221,"context_line":"                if \"no such column \u0027storage_policy_index\u0027\" not in str(err):"},{"line_number":222,"context_line":"                    raise"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAWH%2F%2B75k%3D","line":219,"in_reply_to":"AAAAWH%2F%2FBKk%3D","updated":"2014-03-21 15:16:46.000000000","message":"Done","commit_id":"29079ec1f808ddc1e69d13ba99f92b3a70dd7698"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"049da864798578175cb6812ff5df51772242249f","unresolved":false,"context_lines":[{"line_number":216,"context_line":"                with self.get() as conn:"},{"line_number":217,"context_line":"                    storage_policy_index \u003d conn.execute("},{"line_number":218,"context_line":"                        \u0027SELECT storage_policy_index from account_stat\u0027"},{"line_number":219,"context_line":"                    ).fetchone()[0]"},{"line_number":220,"context_line":"            except sqlite3.OperationalError as err:"},{"line_number":221,"context_line":"                if \"no such column \u0027storage_policy_index\u0027\" not in str(err):"},{"line_number":222,"context_line":"                    raise"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAWH%2F%2FBKk%3D","line":219,"in_reply_to":"AAAAWH%2F%2FBXY%3D","updated":"2014-03-20 22:25:48.000000000","message":"I believe I meant policy_stat here but let me go retrace my steps and make sure, will also check why unit tests didn\u0027t catch this (must be limited to pol 0 right now)","commit_id":"29079ec1f808ddc1e69d13ba99f92b3a70dd7698"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"5e3ae412a1400aa28abd44f7d6c4c4572647a750","unresolved":false,"context_lines":[{"line_number":282,"context_line":"        except sqlite3.OperationalError as err:"},{"line_number":283,"context_line":"            if \u0027no such table: policy_stat\u0027 in str(err):"},{"line_number":284,"context_line":"                with self.get() as conn:"},{"line_number":285,"context_line":"                    self.create_policy_stat_table(conn)"},{"line_number":286,"context_line":"        pending_size \u003d 0"},{"line_number":287,"context_line":"        try:"},{"line_number":288,"context_line":"            pending_size \u003d os.path.getsize(self.pending_file)"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAWH%2F%2FBfU%3D","line":285,"updated":"2014-03-20 21:44:04.000000000","message":"Isn\u0027t there a way to do this EAFP instead of LBYL?\n\nOh i guess it\u0027d be during merge... but that\u0027s fine!","commit_id":"29079ec1f808ddc1e69d13ba99f92b3a70dd7698"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"049da864798578175cb6812ff5df51772242249f","unresolved":false,"context_lines":[{"line_number":282,"context_line":"        except sqlite3.OperationalError as err:"},{"line_number":283,"context_line":"            if \u0027no such table: policy_stat\u0027 in str(err):"},{"line_number":284,"context_line":"                with self.get() as conn:"},{"line_number":285,"context_line":"                    self.create_policy_stat_table(conn)"},{"line_number":286,"context_line":"        pending_size \u003d 0"},{"line_number":287,"context_line":"        try:"},{"line_number":288,"context_line":"            pending_size \u003d os.path.getsize(self.pending_file)"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAWH%2F%2FBIg%3D","line":285,"in_reply_to":"AAAAWH%2F%2FBfU%3D","updated":"2014-03-20 22:25:48.000000000","message":"So are you suggesting I remove this and create the table during merge and ignore any sorta of \u0027already created\u0027 error?","commit_id":"29079ec1f808ddc1e69d13ba99f92b3a70dd7698"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"5e3ae412a1400aa28abd44f7d6c4c4572647a750","unresolved":false,"context_lines":[{"line_number":337,"context_line":"        :returns: dict pre-formatted with header names for keys"},{"line_number":338,"context_line":"                  and cooresponding policy stat counts as values"},{"line_number":339,"context_line":"        \"\"\""},{"line_number":340,"context_line":"        info \u003d \"\""},{"line_number":341,"context_line":"        self._commit_puts_stale_ok()"},{"line_number":342,"context_line":"        try:"},{"line_number":343,"context_line":"            with self.get() as conn:"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAWH%2F%2FBRY%3D","line":340,"updated":"2014-03-20 21:44:04.000000000","message":"either set it to [] to be more like the data type returned from conn.execute, or None to indicate it\u0027s some empty value you don\u0027t care about.","commit_id":"29079ec1f808ddc1e69d13ba99f92b3a70dd7698"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"828113a42903dc6cd923c8441f545284aa50fd91","unresolved":false,"context_lines":[{"line_number":337,"context_line":"        :returns: dict pre-formatted with header names for keys"},{"line_number":338,"context_line":"                  and cooresponding policy stat counts as values"},{"line_number":339,"context_line":"        \"\"\""},{"line_number":340,"context_line":"        info \u003d \"\""},{"line_number":341,"context_line":"        self._commit_puts_stale_ok()"},{"line_number":342,"context_line":"        try:"},{"line_number":343,"context_line":"            with self.get() as conn:"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAWH%2F%2B75g%3D","line":340,"in_reply_to":"AAAAWH%2F%2FBIM%3D","updated":"2014-03-21 15:16:46.000000000","message":"Done","commit_id":"29079ec1f808ddc1e69d13ba99f92b3a70dd7698"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"049da864798578175cb6812ff5df51772242249f","unresolved":false,"context_lines":[{"line_number":337,"context_line":"        :returns: dict pre-formatted with header names for keys"},{"line_number":338,"context_line":"                  and cooresponding policy stat counts as values"},{"line_number":339,"context_line":"        \"\"\""},{"line_number":340,"context_line":"        info \u003d \"\""},{"line_number":341,"context_line":"        self._commit_puts_stale_ok()"},{"line_number":342,"context_line":"        try:"},{"line_number":343,"context_line":"            with self.get() as conn:"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAWH%2F%2FBIM%3D","line":340,"in_reply_to":"AAAAWH%2F%2FBRY%3D","updated":"2014-03-20 22:25:48.000000000","message":"got it","commit_id":"29079ec1f808ddc1e69d13ba99f92b3a70dd7698"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"5e3ae412a1400aa28abd44f7d6c4c4572647a750","unresolved":false,"context_lines":[{"line_number":349,"context_line":"                raise"},{"line_number":350,"context_line":"        stats \u003d {}"},{"line_number":351,"context_line":"        # don\u0027t bother to print rollup stats if there\u0027s only one policy"},{"line_number":352,"context_line":"        if len(info) \u003e 1:"},{"line_number":353,"context_line":"            for row in info:"},{"line_number":354,"context_line":"                key_bytes_used \u003d POLICY + \u0027-\u0027 + \u0027Bytes-Used\u0027 + \u0027-\u0027 + \\"},{"line_number":355,"context_line":"                    str(row[\u0027storage_policy_index\u0027])"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAWH%2F%2FBc0%3D","line":352,"updated":"2014-03-20 21:44:04.000000000","message":"If the one policy in use is not the default then I think it\u0027s still valuable to bring out the rollups.  Maybe if there\u0027s only one POLICIES, but I\u0027m more inclined to always with the rollups.","commit_id":"29079ec1f808ddc1e69d13ba99f92b3a70dd7698"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"049da864798578175cb6812ff5df51772242249f","unresolved":false,"context_lines":[{"line_number":349,"context_line":"                raise"},{"line_number":350,"context_line":"        stats \u003d {}"},{"line_number":351,"context_line":"        # don\u0027t bother to print rollup stats if there\u0027s only one policy"},{"line_number":352,"context_line":"        if len(info) \u003e 1:"},{"line_number":353,"context_line":"            for row in info:"},{"line_number":354,"context_line":"                key_bytes_used \u003d POLICY + \u0027-\u0027 + \u0027Bytes-Used\u0027 + \u0027-\u0027 + \\"},{"line_number":355,"context_line":"                    str(row[\u0027storage_policy_index\u0027])"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAWH%2F%2FBHg%3D","line":352,"in_reply_to":"AAAAWH%2F%2FBc0%3D","updated":"2014-03-20 22:25:48.000000000","message":"this is about policies that exist, not ones that are \"in use\".  What this is saying is that if nobody has defined any policies (if they had there would be 2 min) then we don\u0027t print the cumulative values and then repeat them again (same values) with a policy name of \u0027Policy_0\u0027 (if they don\u0027t name it something else).","commit_id":"29079ec1f808ddc1e69d13ba99f92b3a70dd7698"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"5e3ae412a1400aa28abd44f7d6c4c4572647a750","unresolved":false,"context_lines":[{"line_number":357,"context_line":"                    str(row[\u0027storage_policy_index\u0027])"},{"line_number":358,"context_line":"                stats[key_bytes_used] \u003d row[\u0027bytes_used\u0027]"},{"line_number":359,"context_line":"                stats[key_object_count] \u003d row[\u0027object_count\u0027]"},{"line_number":360,"context_line":"        return stats"},{"line_number":361,"context_line":""},{"line_number":362,"context_line":"    def get_info(self):"},{"line_number":363,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAWH%2F%2FBSA%3D","line":360,"updated":"2014-03-20 21:44:04.000000000","message":"I think this method should just return a dict of spi to {\u0027bytes_used\u0027, \u0027object_count\u0027} - then let some other sap turn the data structure into headers (or stuff the data onto an existing request) in a pure function.","commit_id":"29079ec1f808ddc1e69d13ba99f92b3a70dd7698"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"049da864798578175cb6812ff5df51772242249f","unresolved":false,"context_lines":[{"line_number":357,"context_line":"                    str(row[\u0027storage_policy_index\u0027])"},{"line_number":358,"context_line":"                stats[key_bytes_used] \u003d row[\u0027bytes_used\u0027]"},{"line_number":359,"context_line":"                stats[key_object_count] \u003d row[\u0027object_count\u0027]"},{"line_number":360,"context_line":"        return stats"},{"line_number":361,"context_line":""},{"line_number":362,"context_line":"    def get_info(self):"},{"line_number":363,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAWH%2F%2FBHI%3D","line":360,"in_reply_to":"AAAAWH%2F%2FBSA%3D","updated":"2014-03-20 22:25:48.000000000","message":"That\u0027s certainly doable, but I\u0027m the sap that will be also turning this into headers in some other function :)  How strongly do you feel about this?","commit_id":"29079ec1f808ddc1e69d13ba99f92b3a70dd7698"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"5e3ae412a1400aa28abd44f7d6c4c4572647a750","unresolved":false,"context_lines":[{"line_number":466,"context_line":"                          \u0027deleted\u0027, \u0027storage_policy_index\u0027}"},{"line_number":467,"context_line":"        :param source: if defined, update incoming_sync with the source"},{"line_number":468,"context_line":"        \"\"\""},{"line_number":469,"context_line":"        def _really_merge_items(conn):"},{"line_number":470,"context_line":"            max_rowid \u003d -1"},{"line_number":471,"context_line":"            for rec in item_list:"},{"line_number":472,"context_line":"                record \u003d [rec[\u0027name\u0027], rec[\u0027put_timestamp\u0027],"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAWH%2F%2FBaA%3D","line":469,"updated":"2014-03-20 21:44:04.000000000","message":"subtle.","commit_id":"29079ec1f808ddc1e69d13ba99f92b3a70dd7698"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"049da864798578175cb6812ff5df51772242249f","unresolved":false,"context_lines":[{"line_number":466,"context_line":"                          \u0027deleted\u0027, \u0027storage_policy_index\u0027}"},{"line_number":467,"context_line":"        :param source: if defined, update incoming_sync with the source"},{"line_number":468,"context_line":"        \"\"\""},{"line_number":469,"context_line":"        def _really_merge_items(conn):"},{"line_number":470,"context_line":"            max_rowid \u003d -1"},{"line_number":471,"context_line":"            for rec in item_list:"},{"line_number":472,"context_line":"                record \u003d [rec[\u0027name\u0027], rec[\u0027put_timestamp\u0027],"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAWH%2F%2FBG8%3D","line":469,"in_reply_to":"AAAAWH%2F%2FBaA%3D","updated":"2014-03-20 22:25:48.000000000","message":"yeah, copied that from one of Sam\u0027s patches that had to do something similar :)","commit_id":"29079ec1f808ddc1e69d13ba99f92b3a70dd7698"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"5e3ae412a1400aa28abd44f7d6c4c4572647a750","unresolved":false,"context_lines":[{"line_number":532,"context_line":"                if \u0027no such column: storage_policy_index\u0027 not in str(err):"},{"line_number":533,"context_line":"                    raise"},{"line_number":534,"context_line":"                self._migrate_add_storage_policy_index(conn)"},{"line_number":535,"context_line":"                _really_merge_items(conn)"},{"line_number":536,"context_line":""},{"line_number":537,"context_line":"    def _migrate_add_storage_policy_index(self, conn):"},{"line_number":538,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAWH%2F%2FBaI%3D","line":535,"updated":"2014-03-20 21:44:04.000000000","message":"wow, ok I see what you did there.","commit_id":"29079ec1f808ddc1e69d13ba99f92b3a70dd7698"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"5e3ae412a1400aa28abd44f7d6c4c4572647a750","unresolved":false,"context_lines":[{"line_number":546,"context_line":"            UPDATE container SET storage_policy_index\u003d0;"},{"line_number":547,"context_line":""},{"line_number":548,"context_line":"            %s"},{"line_number":549,"context_line":"        \u0027\u0027\u0027 % POLICY_STAT_TRIGGER_SCRIPT)"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAWH%2F%2FBiE%3D","line":549,"updated":"2014-03-20 21:44:04.000000000","message":"use string concat instead of string interpolation.  I think this can slo just create the policy stat table?","commit_id":"29079ec1f808ddc1e69d13ba99f92b3a70dd7698"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"049da864798578175cb6812ff5df51772242249f","unresolved":false,"context_lines":[{"line_number":546,"context_line":"            UPDATE container SET storage_policy_index\u003d0;"},{"line_number":547,"context_line":""},{"line_number":548,"context_line":"            %s"},{"line_number":549,"context_line":"        \u0027\u0027\u0027 % POLICY_STAT_TRIGGER_SCRIPT)"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAWH%2F%2FBFc%3D","line":549,"in_reply_to":"AAAAWH%2F%2FBiE%3D","updated":"2014-03-20 22:25:48.000000000","message":"OK.  Need to look into the 2nd comment a bit more but I think you\u0027re right","commit_id":"29079ec1f808ddc1e69d13ba99f92b3a70dd7698"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"73a2e0ac0fd583a18c66d603cf902afbe38623e0","unresolved":false,"context_lines":[{"line_number":196,"context_line":"    def _commit_puts_load(self, item_list, entry):"},{"line_number":197,"context_line":"        \"\"\"See :func:`swift.common.db.DatabaseBroker._commit_puts_load`\"\"\""},{"line_number":198,"context_line":"        loaded \u003d pickle.loads(entry.decode(\u0027base64\u0027))"},{"line_number":199,"context_line":"        # check to see if the udpate includes policy_index or not"},{"line_number":200,"context_line":"        (name, put_timestamp, delete_timestamp, object_count, bytes_used,"},{"line_number":201,"context_line":"         deleted) \u003d loaded[:6]"},{"line_number":202,"context_line":"        if len(loaded) \u003e 6:"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAWH%2F%2BkEE%3D","line":199,"updated":"2014-03-26 01:46:22.000000000","message":"*update","commit_id":"31e9c81cedaec90b17a181ae60ef162f5c0b31ad"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"73a2e0ac0fd583a18c66d603cf902afbe38623e0","unresolved":false,"context_lines":[{"line_number":204,"context_line":"        else:"},{"line_number":205,"context_line":"            # legacy support during upgrade until first non legacy storage"},{"line_number":206,"context_line":"            # policy is defined"},{"line_number":207,"context_line":"            storage_policy_index \u003d 0"},{"line_number":208,"context_line":"        item_list.append("},{"line_number":209,"context_line":"            {\u0027name\u0027: name,"},{"line_number":210,"context_line":"             \u0027put_timestamp\u0027: put_timestamp,"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAWH%2F%2BjoQ%3D","line":207,"updated":"2014-03-26 01:46:22.000000000","message":"this branch needs a test","commit_id":"31e9c81cedaec90b17a181ae60ef162f5c0b31ad"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"d7030a157a7a6212dd11644b492322ccecdd16fb","unresolved":false,"context_lines":[{"line_number":204,"context_line":"        else:"},{"line_number":205,"context_line":"            # legacy support during upgrade until first non legacy storage"},{"line_number":206,"context_line":"            # policy is defined"},{"line_number":207,"context_line":"            storage_policy_index \u003d 0"},{"line_number":208,"context_line":"        item_list.append("},{"line_number":209,"context_line":"            {\u0027name\u0027: name,"},{"line_number":210,"context_line":"             \u0027put_timestamp\u0027: put_timestamp,"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAWH%2F%2BivY%3D","line":207,"in_reply_to":"AAAAWH%2F%2BjoQ%3D","updated":"2014-03-26 02:39:15.000000000","message":"nice catch!  i guess I somehow convinced myself that the tests which exercised the container put to the account w/o the storage policy index were hitting path - but that doesn\u0027t make any sense - more likely I just didn\u0027t think about it.","commit_id":"31e9c81cedaec90b17a181ae60ef162f5c0b31ad"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"9957426e286304188bf62aa796cba67ba2fdb26a","unresolved":false,"context_lines":[{"line_number":32,"context_line":"POLICY_STAT_TRIGGER_SCRIPT \u003d \"\"\""},{"line_number":33,"context_line":"    CREATE TRIGGER container_insert_ps AFTER INSERT ON container"},{"line_number":34,"context_line":"    BEGIN"},{"line_number":35,"context_line":"        INSERT OR IGNORE INTO policy_stat (storage_policy_index,"},{"line_number":36,"context_line":"            object_count, bytes_used) values (new.storage_policy_index, 0, 0);"},{"line_number":37,"context_line":"        UPDATE policy_stat"},{"line_number":38,"context_line":"        SET object_count \u003d object_count + new.object_count,"}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAAWH%2F%2BemI%3D","line":35,"updated":"2014-03-26 14:52:15.000000000","message":"want to double check this SQL here, this is the best I could find for either updating an existing row or adding a new one if it didn\u0027t exist.  Don\u0027t think anyone commented on this but I wasn\u0027t 100% certain of the \u0027insert or ignore into\u0027 thing","commit_id":"280cd25254ee4bb8cb31f76de00e13be97c9956f"}],"swift/account/server.py":[{"author":{"_account_id":5189,"name":"Yuan Zhou","email":"dunk007@gmail.com","username":"yuan-zhou"},"change_message_id":"c27aa3d3abb8b82595e4ddc87b572ade7de5d733","unresolved":false,"context_lines":[{"line_number":183,"context_line":"            \u0027X-Account-Bytes-Used\u0027: info[\u0027bytes_used\u0027],"},{"line_number":184,"context_line":"            \u0027X-Timestamp\u0027: info[\u0027created_at\u0027],"},{"line_number":185,"context_line":"            \u0027X-PUT-Timestamp\u0027: info[\u0027put_timestamp\u0027]}"},{"line_number":186,"context_line":"        headers.update(broker.get_policy_stats())"},{"line_number":187,"context_line":"        headers.update((key, value)"},{"line_number":188,"context_line":"                       for key, (value, timestamp) in"},{"line_number":189,"context_line":"                       broker.metadata.iteritems() if value !\u003d \u0027\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUX%2F%2B8JQ%3D","line":186,"updated":"2014-02-18 04:00:16.000000000","message":"old cluster don\u0027t have the \u0027policy_stat\u0027 table and this will break the HEAD ops\nwe might need to use \u0027try\u0027 first here? \n\ntry:\n    headers.update(broker.get_policy_stats())\nexcept:\n    pass","commit_id":"275b8667f2c53adc24a788102aee83a9057bc1c5"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"2475d51e415261cc085db01b7f059cf66afb67f0","unresolved":false,"context_lines":[{"line_number":183,"context_line":"            \u0027X-Account-Bytes-Used\u0027: info[\u0027bytes_used\u0027],"},{"line_number":184,"context_line":"            \u0027X-Timestamp\u0027: info[\u0027created_at\u0027],"},{"line_number":185,"context_line":"            \u0027X-PUT-Timestamp\u0027: info[\u0027put_timestamp\u0027]}"},{"line_number":186,"context_line":"        headers.update(broker.get_policy_stats())"},{"line_number":187,"context_line":"        headers.update((key, value)"},{"line_number":188,"context_line":"                       for key, (value, timestamp) in"},{"line_number":189,"context_line":"                       broker.metadata.iteritems() if value !\u003d \u0027\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUX%2F%2B7aA%3D","line":186,"in_reply_to":"AAAAUX%2F%2B8JQ%3D","updated":"2014-02-18 06:10:23.000000000","message":"yeah, I think you\u0027re right.  I covered the cases where the DB is initially created and for when policies don\u0027t exist at DB init time but are added later but not for when the DB is already there w/o the table.  Will look at this some more tomorrow... thanks!","commit_id":"275b8667f2c53adc24a788102aee83a9057bc1c5"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"5e3ae412a1400aa28abd44f7d6c4c4572647a750","unresolved":false,"context_lines":[{"line_number":130,"context_line":"                                 req.headers[\u0027x-delete-timestamp\u0027],"},{"line_number":131,"context_line":"                                 req.headers[\u0027x-object-count\u0027],"},{"line_number":132,"context_line":"                                 req.headers[\u0027x-bytes-used\u0027],"},{"line_number":133,"context_line":"                                 req.headers[POLICY_INDEX.lower()])"},{"line_number":134,"context_line":"            if req.headers[\u0027x-delete-timestamp\u0027] \u003e \\"},{"line_number":135,"context_line":"                    req.headers[\u0027x-put-timestamp\u0027]:"},{"line_number":136,"context_line":"                return HTTPNoContent(request\u003dreq)"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAWH%2F%2FBUI%3D","line":133,"updated":"2014-03-20 21:44:04.000000000","message":"\"lower\" is not needed.","commit_id":"29079ec1f808ddc1e69d13ba99f92b3a70dd7698"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"828113a42903dc6cd923c8441f545284aa50fd91","unresolved":false,"context_lines":[{"line_number":130,"context_line":"                                 req.headers[\u0027x-delete-timestamp\u0027],"},{"line_number":131,"context_line":"                                 req.headers[\u0027x-object-count\u0027],"},{"line_number":132,"context_line":"                                 req.headers[\u0027x-bytes-used\u0027],"},{"line_number":133,"context_line":"                                 req.headers[POLICY_INDEX.lower()])"},{"line_number":134,"context_line":"            if req.headers[\u0027x-delete-timestamp\u0027] \u003e \\"},{"line_number":135,"context_line":"                    req.headers[\u0027x-put-timestamp\u0027]:"},{"line_number":136,"context_line":"                return HTTPNoContent(request\u003dreq)"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAWH%2F%2B74s%3D","line":133,"in_reply_to":"AAAAWH%2F%2FBFM%3D","updated":"2014-03-21 15:16:46.000000000","message":"Done","commit_id":"29079ec1f808ddc1e69d13ba99f92b3a70dd7698"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"049da864798578175cb6812ff5df51772242249f","unresolved":false,"context_lines":[{"line_number":130,"context_line":"                                 req.headers[\u0027x-delete-timestamp\u0027],"},{"line_number":131,"context_line":"                                 req.headers[\u0027x-object-count\u0027],"},{"line_number":132,"context_line":"                                 req.headers[\u0027x-bytes-used\u0027],"},{"line_number":133,"context_line":"                                 req.headers[POLICY_INDEX.lower()])"},{"line_number":134,"context_line":"            if req.headers[\u0027x-delete-timestamp\u0027] \u003e \\"},{"line_number":135,"context_line":"                    req.headers[\u0027x-put-timestamp\u0027]:"},{"line_number":136,"context_line":"                return HTTPNoContent(request\u003dreq)"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAWH%2F%2FBFM%3D","line":133,"in_reply_to":"AAAAWH%2F%2FBUI%3D","updated":"2014-03-20 22:25:48.000000000","message":"OK, thanks","commit_id":"29079ec1f808ddc1e69d13ba99f92b3a70dd7698"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"5e3ae412a1400aa28abd44f7d6c4c4572647a750","unresolved":false,"context_lines":[{"line_number":184,"context_line":"            \u0027X-Account-Bytes-Used\u0027: info[\u0027bytes_used\u0027],"},{"line_number":185,"context_line":"            \u0027X-Timestamp\u0027: info[\u0027created_at\u0027],"},{"line_number":186,"context_line":"            \u0027X-PUT-Timestamp\u0027: info[\u0027put_timestamp\u0027]}"},{"line_number":187,"context_line":"        headers.update(broker.get_policy_stats())"},{"line_number":188,"context_line":"        headers.update((key, value)"},{"line_number":189,"context_line":"                       for key, (value, timestamp) in"},{"line_number":190,"context_line":"                       broker.metadata.iteritems() if value !\u003d \u0027\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAWH%2F%2FBTA%3D","line":187,"updated":"2014-03-20 21:44:04.000000000","message":"wait, who translates policy index to name?","commit_id":"29079ec1f808ddc1e69d13ba99f92b3a70dd7698"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"049da864798578175cb6812ff5df51772242249f","unresolved":false,"context_lines":[{"line_number":184,"context_line":"            \u0027X-Account-Bytes-Used\u0027: info[\u0027bytes_used\u0027],"},{"line_number":185,"context_line":"            \u0027X-Timestamp\u0027: info[\u0027created_at\u0027],"},{"line_number":186,"context_line":"            \u0027X-PUT-Timestamp\u0027: info[\u0027put_timestamp\u0027]}"},{"line_number":187,"context_line":"        headers.update(broker.get_policy_stats())"},{"line_number":188,"context_line":"        headers.update((key, value)"},{"line_number":189,"context_line":"                       for key, (value, timestamp) in"},{"line_number":190,"context_line":"                       broker.metadata.iteritems() if value !\u003d \u0027\u0027)"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAWH%2F%2FBEw%3D","line":187,"in_reply_to":"AAAAWH%2F%2FBTA%3D","updated":"2014-03-20 22:25:48.000000000","message":"that happens in the proxy, you\u0027ve probably seen it by now","commit_id":"29079ec1f808ddc1e69d13ba99f92b3a70dd7698"}],"swift/common/storage_policy.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"5e3ae412a1400aa28abd44f7d6c4c4572647a750","unresolved":false,"context_lines":[{"line_number":214,"context_line":"    # If a 0 policy wasn\u0027t explicitly given, or nothing was"},{"line_number":215,"context_line":"    # provided, create the 0 policy now"},{"line_number":216,"context_line":"    if not policies or need_pol0:"},{"line_number":217,"context_line":"        policies.append(StoragePolicy(0, \u0027Policy_0\u0027, False))"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"    # if needed, specify default of policy 0"},{"line_number":220,"context_line":"    if need_default:"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAWH%2F%2FBOo%3D","line":217,"updated":"2014-03-20 21:44:04.000000000","message":"nice.","commit_id":"29079ec1f808ddc1e69d13ba99f92b3a70dd7698"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"049da864798578175cb6812ff5df51772242249f","unresolved":false,"context_lines":[{"line_number":214,"context_line":"    # If a 0 policy wasn\u0027t explicitly given, or nothing was"},{"line_number":215,"context_line":"    # provided, create the 0 policy now"},{"line_number":216,"context_line":"    if not policies or need_pol0:"},{"line_number":217,"context_line":"        policies.append(StoragePolicy(0, \u0027Policy_0\u0027, False))"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"    # if needed, specify default of policy 0"},{"line_number":220,"context_line":"    if need_default:"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAWH%2F%2FBEo%3D","line":217,"in_reply_to":"AAAAWH%2F%2FBOo%3D","updated":"2014-03-20 22:25:48.000000000","message":"yeah looked a little funny in the roll-up without a policy name :)","commit_id":"29079ec1f808ddc1e69d13ba99f92b3a70dd7698"}],"swift/container/server.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"5e3ae412a1400aa28abd44f7d6c4c4572647a750","unresolved":false,"context_lines":[{"line_number":179,"context_line":"                \u0027x-object-count\u0027: info[\u0027object_count\u0027],"},{"line_number":180,"context_line":"                \u0027x-bytes-used\u0027: info[\u0027bytes_used\u0027],"},{"line_number":181,"context_line":"                \u0027x-trans-id\u0027: req.headers.get(\u0027x-trans-id\u0027, \u0027-\u0027),"},{"line_number":182,"context_line":"                POLICY_INDEX.lower(): policy_index,"},{"line_number":183,"context_line":"                \u0027user-agent\u0027: \u0027container-server %s\u0027 % os.getpid(),"},{"line_number":184,"context_line":"                \u0027referer\u0027: req.as_referer()})"},{"line_number":185,"context_line":"            if req.headers.get(\u0027x-account-override-deleted\u0027, \u0027no\u0027).lower() \u003d\u003d \\"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAWH%2F%2FBQo%3D","line":182,"updated":"2014-03-20 21:44:04.000000000","message":"lower is not needed","commit_id":"29079ec1f808ddc1e69d13ba99f92b3a70dd7698"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"828113a42903dc6cd923c8441f545284aa50fd91","unresolved":false,"context_lines":[{"line_number":179,"context_line":"                \u0027x-object-count\u0027: info[\u0027object_count\u0027],"},{"line_number":180,"context_line":"                \u0027x-bytes-used\u0027: info[\u0027bytes_used\u0027],"},{"line_number":181,"context_line":"                \u0027x-trans-id\u0027: req.headers.get(\u0027x-trans-id\u0027, \u0027-\u0027),"},{"line_number":182,"context_line":"                POLICY_INDEX.lower(): policy_index,"},{"line_number":183,"context_line":"                \u0027user-agent\u0027: \u0027container-server %s\u0027 % os.getpid(),"},{"line_number":184,"context_line":"                \u0027referer\u0027: req.as_referer()})"},{"line_number":185,"context_line":"            if req.headers.get(\u0027x-account-override-deleted\u0027, \u0027no\u0027).lower() \u003d\u003d \\"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAWH%2F%2B74I%3D","line":182,"in_reply_to":"AAAAWH%2F%2FBEk%3D","updated":"2014-03-21 15:16:46.000000000","message":"Done","commit_id":"29079ec1f808ddc1e69d13ba99f92b3a70dd7698"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"049da864798578175cb6812ff5df51772242249f","unresolved":false,"context_lines":[{"line_number":179,"context_line":"                \u0027x-object-count\u0027: info[\u0027object_count\u0027],"},{"line_number":180,"context_line":"                \u0027x-bytes-used\u0027: info[\u0027bytes_used\u0027],"},{"line_number":181,"context_line":"                \u0027x-trans-id\u0027: req.headers.get(\u0027x-trans-id\u0027, \u0027-\u0027),"},{"line_number":182,"context_line":"                POLICY_INDEX.lower(): policy_index,"},{"line_number":183,"context_line":"                \u0027user-agent\u0027: \u0027container-server %s\u0027 % os.getpid(),"},{"line_number":184,"context_line":"                \u0027referer\u0027: req.as_referer()})"},{"line_number":185,"context_line":"            if req.headers.get(\u0027x-account-override-deleted\u0027, \u0027no\u0027).lower() \u003d\u003d \\"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAWH%2F%2FBEk%3D","line":182,"in_reply_to":"AAAAWH%2F%2FBQo%3D","updated":"2014-03-20 22:25:48.000000000","message":"cool","commit_id":"29079ec1f808ddc1e69d13ba99f92b3a70dd7698"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"5e3ae412a1400aa28abd44f7d6c4c4572647a750","unresolved":false,"context_lines":[{"line_number":263,"context_line":"            if policy_idx is None:"},{"line_number":264,"context_line":"                policy_idx \u003d POLICIES.default.idx"},{"line_number":265,"context_line":"            resp \u003d self.account_update(req, account, container, broker,"},{"line_number":266,"context_line":"                                       policy_idx)"},{"line_number":267,"context_line":"            if resp:"},{"line_number":268,"context_line":"                return resp"},{"line_number":269,"context_line":"            if existed:"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAWH%2F%2FBQQ%3D","line":266,"updated":"2014-03-20 21:44:04.000000000","message":"I think in this case you want to send the policy_idx on the container itself - the client isn\u0027t going to send the storage-policy when they say delete container?","commit_id":"29079ec1f808ddc1e69d13ba99f92b3a70dd7698"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"049da864798578175cb6812ff5df51772242249f","unresolved":false,"context_lines":[{"line_number":263,"context_line":"            if policy_idx is None:"},{"line_number":264,"context_line":"                policy_idx \u003d POLICIES.default.idx"},{"line_number":265,"context_line":"            resp \u003d self.account_update(req, account, container, broker,"},{"line_number":266,"context_line":"                                       policy_idx)"},{"line_number":267,"context_line":"            if resp:"},{"line_number":268,"context_line":"                return resp"},{"line_number":269,"context_line":"            if existed:"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAWH%2F%2FBDk%3D","line":266,"in_reply_to":"AAAAWH%2F%2FBQQ%3D","updated":"2014-03-20 22:25:48.000000000","message":"the proxy will add the header to the request, see _backend_requests() in proxy/controllers/container.py","commit_id":"29079ec1f808ddc1e69d13ba99f92b3a70dd7698"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"73a2e0ac0fd583a18c66d603cf902afbe38623e0","unresolved":false,"context_lines":[{"line_number":260,"context_line":"            if not broker.is_deleted():"},{"line_number":261,"context_line":"                return HTTPConflict(request\u003dreq)"},{"line_number":262,"context_line":"            resp \u003d self.account_update(req, account, container, broker,"},{"line_number":263,"context_line":"                                       broker.storage_policy_index)"},{"line_number":264,"context_line":"            if resp:"},{"line_number":265,"context_line":"                return resp"},{"line_number":266,"context_line":"            if existed:"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAWH%2F%2BjMM%3D","line":263,"updated":"2014-03-26 01:46:22.000000000","message":"This is sort of weird; we\u0027re already passing in the broker, so I don\u0027t think we need the extra argument.","commit_id":"31e9c81cedaec90b17a181ae60ef162f5c0b31ad"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"d7030a157a7a6212dd11644b492322ccecdd16fb","unresolved":false,"context_lines":[{"line_number":260,"context_line":"            if not broker.is_deleted():"},{"line_number":261,"context_line":"                return HTTPConflict(request\u003dreq)"},{"line_number":262,"context_line":"            resp \u003d self.account_update(req, account, container, broker,"},{"line_number":263,"context_line":"                                       broker.storage_policy_index)"},{"line_number":264,"context_line":"            if resp:"},{"line_number":265,"context_line":"                return resp"},{"line_number":266,"context_line":"            if existed:"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAAWH%2F%2BiwU%3D","line":263,"in_reply_to":"AAAAWH%2F%2BjMM%3D","updated":"2014-03-26 02:39:15.000000000","message":"oh duh, too many cooks in the kitchen - nice catch.","commit_id":"31e9c81cedaec90b17a181ae60ef162f5c0b31ad"}],"swift/container/updater.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"5e3ae412a1400aa28abd44f7d6c4c4572647a750","unresolved":false,"context_lines":[{"line_number":215,"context_line":"            return"},{"line_number":216,"context_line":"        if self.account_suppressions.get(info[\u0027account\u0027], 0) \u003e time.time():"},{"line_number":217,"context_line":"            return"},{"line_number":218,"context_line":"        if info[\u0027put_timestamp\u0027] \u003e info[\u0027reported_put_timestamp\u0027] or 1 or \\"},{"line_number":219,"context_line":"                info[\u0027delete_timestamp\u0027] \u003e info[\u0027reported_delete_timestamp\u0027] \\"},{"line_number":220,"context_line":"                or info[\u0027object_count\u0027] !\u003d info[\u0027reported_object_count\u0027] or \\"},{"line_number":221,"context_line":"                info[\u0027bytes_used\u0027] !\u003d info[\u0027reported_bytes_used\u0027]:"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAWH%2F%2FBQA%3D","line":218,"updated":"2014-03-20 21:44:04.000000000","message":"lol - wat?","commit_id":"29079ec1f808ddc1e69d13ba99f92b3a70dd7698"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"828113a42903dc6cd923c8441f545284aa50fd91","unresolved":false,"context_lines":[{"line_number":215,"context_line":"            return"},{"line_number":216,"context_line":"        if self.account_suppressions.get(info[\u0027account\u0027], 0) \u003e time.time():"},{"line_number":217,"context_line":"            return"},{"line_number":218,"context_line":"        if info[\u0027put_timestamp\u0027] \u003e info[\u0027reported_put_timestamp\u0027] or 1 or \\"},{"line_number":219,"context_line":"                info[\u0027delete_timestamp\u0027] \u003e info[\u0027reported_delete_timestamp\u0027] \\"},{"line_number":220,"context_line":"                or info[\u0027object_count\u0027] !\u003d info[\u0027reported_object_count\u0027] or \\"},{"line_number":221,"context_line":"                info[\u0027bytes_used\u0027] !\u003d info[\u0027reported_bytes_used\u0027]:"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAWH%2F%2B73o%3D","line":218,"in_reply_to":"AAAAWH%2F%2FBDU%3D","updated":"2014-03-21 15:16:46.000000000","message":"Done","commit_id":"29079ec1f808ddc1e69d13ba99f92b3a70dd7698"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"049da864798578175cb6812ff5df51772242249f","unresolved":false,"context_lines":[{"line_number":215,"context_line":"            return"},{"line_number":216,"context_line":"        if self.account_suppressions.get(info[\u0027account\u0027], 0) \u003e time.time():"},{"line_number":217,"context_line":"            return"},{"line_number":218,"context_line":"        if info[\u0027put_timestamp\u0027] \u003e info[\u0027reported_put_timestamp\u0027] or 1 or \\"},{"line_number":219,"context_line":"                info[\u0027delete_timestamp\u0027] \u003e info[\u0027reported_delete_timestamp\u0027] \\"},{"line_number":220,"context_line":"                or info[\u0027object_count\u0027] !\u003d info[\u0027reported_object_count\u0027] or \\"},{"line_number":221,"context_line":"                info[\u0027bytes_used\u0027] !\u003d info[\u0027reported_bytes_used\u0027]:"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAWH%2F%2FBDU%3D","line":218,"in_reply_to":"AAAAWH%2F%2FBQA%3D","updated":"2014-03-20 22:25:48.000000000","message":"ha!  must have been a late night!!  :)","commit_id":"29079ec1f808ddc1e69d13ba99f92b3a70dd7698"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"5e3ae412a1400aa28abd44f7d6c4c4572647a750","unresolved":false,"context_lines":[{"line_number":279,"context_line":"                    \u0027X-Object-Count\u0027: count,"},{"line_number":280,"context_line":"                    \u0027X-Bytes-Used\u0027: bytes,"},{"line_number":281,"context_line":"                    \u0027X-Account-Override-Deleted\u0027: \u0027yes\u0027,"},{"line_number":282,"context_line":"                    POLICY_INDEX: storage_policy_index,"},{"line_number":283,"context_line":"                    \u0027user-agent\u0027: self.user_agent}"},{"line_number":284,"context_line":"                conn \u003d http_connect("},{"line_number":285,"context_line":"                    node[\u0027ip\u0027], node[\u0027port\u0027], node[\u0027device\u0027], part,"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAWH%2F%2FBP8%3D","line":282,"updated":"2014-03-20 21:44:04.000000000","message":"see there you go!","commit_id":"29079ec1f808ddc1e69d13ba99f92b3a70dd7698"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"049da864798578175cb6812ff5df51772242249f","unresolved":false,"context_lines":[{"line_number":279,"context_line":"                    \u0027X-Object-Count\u0027: count,"},{"line_number":280,"context_line":"                    \u0027X-Bytes-Used\u0027: bytes,"},{"line_number":281,"context_line":"                    \u0027X-Account-Override-Deleted\u0027: \u0027yes\u0027,"},{"line_number":282,"context_line":"                    POLICY_INDEX: storage_policy_index,"},{"line_number":283,"context_line":"                    \u0027user-agent\u0027: self.user_agent}"},{"line_number":284,"context_line":"                conn \u003d http_connect("},{"line_number":285,"context_line":"                    node[\u0027ip\u0027], node[\u0027port\u0027], node[\u0027device\u0027], part,"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAWH%2F%2FBDI%3D","line":282,"in_reply_to":"AAAAWH%2F%2FBP8%3D","updated":"2014-03-20 22:25:48.000000000","message":":)","commit_id":"29079ec1f808ddc1e69d13ba99f92b3a70dd7698"}],"swift/proxy/controllers/base.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"5e3ae412a1400aa28abd44f7d6c4c4572647a750","unresolved":false,"context_lines":[{"line_number":1243,"context_line":"        # if any policy index related headers are present in resp headers,"},{"line_number":1244,"context_line":"        # replace them with the friendly policy name"},{"line_number":1245,"context_line":"        if [header for header in res.headers if POLICY in header]:"},{"line_number":1246,"context_line":"            self.update_policy_info(res)"},{"line_number":1247,"context_line":""},{"line_number":1248,"context_line":"        return res"},{"line_number":1249,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAWH%2F%2FBO0%3D","line":1246,"updated":"2014-03-20 21:44:04.000000000","message":"oh wow, I didn\u0027t know this magic was here.  Not sure if it\u0027s better to do it here, or in the AccountController or maybe even in the AccountServer?!\n\nWhich kinds of requests hit this block today - just container read?","commit_id":"29079ec1f808ddc1e69d13ba99f92b3a70dd7698"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"049da864798578175cb6812ff5df51772242249f","unresolved":false,"context_lines":[{"line_number":1243,"context_line":"        # if any policy index related headers are present in resp headers,"},{"line_number":1244,"context_line":"        # replace them with the friendly policy name"},{"line_number":1245,"context_line":"        if [header for header in res.headers if POLICY in header]:"},{"line_number":1246,"context_line":"            self.update_policy_info(res)"},{"line_number":1247,"context_line":""},{"line_number":1248,"context_line":"        return res"},{"line_number":1249,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAWH%2F%2FBBQ%3D","line":1246,"in_reply_to":"AAAAWH%2F%2FBO0%3D","updated":"2014-03-20 22:25:48.000000000","message":"well, this function is where I was almost certain there was a more efficient way to do this.  I believe this is on every get or head response.  Prior to this patch you can see it was pretty simple and I think I added it as a result of a comment you made in Oakland about clients seeing the policy idx in response headers.  It got a little hairy replacing more than just one header.  Sam had commented on wanting policy indexes in the headers when requests were made directly of the storage nodes (something about some accounting thing that Darrell is doing) but names when a client asks via proxy so, well, this is what I came up with :)  Open to suggestions....","commit_id":"29079ec1f808ddc1e69d13ba99f92b3a70dd7698"}],"test/unit/account/test_backend.py":[{"author":{"_account_id":5189,"name":"Yuan Zhou","email":"dunk007@gmail.com","username":"yuan-zhou"},"change_message_id":"4ede1c377da992504d945d9f487da4c63545ab49","unresolved":false,"context_lines":[{"line_number":647,"context_line":""},{"line_number":648,"context_line":"def prespi_create_container_table(self, conn):"},{"line_number":649,"context_line":"    \"\"\""},{"line_number":650,"context_line":"    Copied from AccountBroker before the sstoage_policy_index column was"},{"line_number":651,"context_line":"    added; used for testing with TestAccountBrokerBeforeSPI."},{"line_number":652,"context_line":""},{"line_number":653,"context_line":"    Create container table which is specific to the account DB."}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUX%2F%2BnVQ%3D","line":650,"updated":"2014-02-20 07:46:31.000000000","message":"typo: storage_policy_index ?","commit_id":"6e0220ea80611e8da456c1e0ed02074934ac6ac3"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"f8cb145471c2b5458923cc41c19c65dbebb9bbf6","unresolved":false,"context_lines":[{"line_number":647,"context_line":""},{"line_number":648,"context_line":"def prespi_create_container_table(self, conn):"},{"line_number":649,"context_line":"    \"\"\""},{"line_number":650,"context_line":"    Copied from AccountBroker before the sstoage_policy_index column was"},{"line_number":651,"context_line":"    added; used for testing with TestAccountBrokerBeforeSPI."},{"line_number":652,"context_line":""},{"line_number":653,"context_line":"    Create container table which is specific to the account DB."}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUX%2F%2Bkgc%3D","line":650,"in_reply_to":"AAAAUX%2F%2BnVQ%3D","updated":"2014-02-20 13:13:06.000000000","message":"argh, thanks Yuan :)","commit_id":"6e0220ea80611e8da456c1e0ed02074934ac6ac3"}]}
