)]}'
{"swift/container/replicator_rpc.py":[{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"ffcff5bc7bb3b52bd81d674312966c1fe2852ba2","unresolved":false,"context_lines":[{"line_number":23,"context_line":"class ContainerReplicatorRpc(db_replicator.ReplicatorRpc):"},{"line_number":24,"context_line":"    \"\"\"Handles Replication RPC calls for containers.\"\"\""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    default_policy \u003d STOR_POLICIES.get_policy_0()"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    def sync(self, broker, args):"},{"line_number":29,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAASn%2F%2F15c%3D","line":26,"updated":"2013-08-28 22:32:20.000000000","message":"The plan is for containers to store the policy number, not name, so you don\u0027t actually need to fetch this policy at all. You just know that it\u0027s number 0.","commit_id":"74f22a204cd079c2ce1fa1912f7178e0766b98e2"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"801e623241624794ca46f3b884b54a89774eed03","unresolved":false,"context_lines":[{"line_number":23,"context_line":"class ContainerReplicatorRpc(db_replicator.ReplicatorRpc):"},{"line_number":24,"context_line":"    \"\"\"Handles Replication RPC calls for containers.\"\"\""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    default_policy \u003d STOR_POLICIES.get_policy_0()"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    def sync(self, broker, args):"},{"line_number":29,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAASn%2F%2FzDE%3D","line":26,"updated":"2013-08-29 13:27:23.000000000","message":"not sure I understand why you are getting policy 0 here?  What role does either the default or policy 0 play in comparing the policies specified by 2 containers that don\u0027t match?","commit_id":"74f22a204cd079c2ce1fa1912f7178e0766b98e2"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"ffcff5bc7bb3b52bd81d674312966c1fe2852ba2","unresolved":false,"context_lines":[{"line_number":43,"context_line":"            my_info \u003d broker.get_replication_info()"},{"line_number":44,"context_line":"        except (Exception, Timeout):"},{"line_number":45,"context_line":"            # Let the original sync handle it"},{"line_number":46,"context_line":"            return super(ContainerReplicatorRpc, self).sync(broker, args)"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        default \u003d (self.default_policy, 0)"},{"line_number":49,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAASn%2F%2F15M%3D","line":46,"updated":"2013-08-28 22:32:20.000000000","message":"So, in case of a connection timeout, this\u0027ll call the superclass\u0027s method, which will then have to endure another connection timeout before it gets its exception to handle.","commit_id":"74f22a204cd079c2ce1fa1912f7178e0766b98e2"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"801e623241624794ca46f3b884b54a89774eed03","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        default \u003d (self.default_policy, 0)"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"        my_put_timestamp \u003d my_info.get(\u0027put_timestamp\u0027, 0)"},{"line_number":51,"context_line":"        my_policy_value_time \u003d broker.metadata.get(POLICY, default)"},{"line_number":52,"context_line":"        my_policy \u003d my_policy_value_time[0]"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        metadata \u003d simplejson.loads(metadata) if metadata else {}"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAASn%2F%2FzC4%3D","line":51,"updated":"2013-08-29 13:27:23.000000000","message":"I think what you want here is broker.metadata.get(POLICY_INDEX,(None, None))[0]","commit_id":"74f22a204cd079c2ce1fa1912f7178e0766b98e2"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"801e623241624794ca46f3b884b54a89774eed03","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        my_policy \u003d my_policy_value_time[0]"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        metadata \u003d simplejson.loads(metadata) if metadata else {}"},{"line_number":55,"context_line":"        policy_value_time \u003d metadata.get(POLICY, default)"},{"line_number":56,"context_line":"        policy \u003d policy_value_time[0]"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        # Look for possible policy issues."}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAASn%2F%2FzCU%3D","line":55,"updated":"2013-08-29 13:27:23.000000000","message":"I think what you want here is  \u003d get_stor_pols().policy_to_index(metadata[POLICY][0])","commit_id":"74f22a204cd079c2ce1fa1912f7178e0766b98e2"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"657a998805ae85e008fe1b348202f49e5599963b","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        my_policy \u003d my_policy_value_time[0]"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        metadata \u003d simplejson.loads(metadata) if metadata else {}"},{"line_number":55,"context_line":"        policy_value_time \u003d metadata.get(POLICY, default)"},{"line_number":56,"context_line":"        policy \u003d policy_value_time[0]"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        # Look for possible policy issues."}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAASn%2F%2FuCA%3D","line":55,"in_reply_to":"AAAASn%2F%2FzCU%3D","updated":"2013-08-30 14:12:59.000000000","message":"be sure to check my latest updates, I\u0027ve removed POLICY from almost everywhere, its really only used in the initial request headers.  The metadata now only has POLICY_INDEX available","commit_id":"74f22a204cd079c2ce1fa1912f7178e0766b98e2"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"ffcff5bc7bb3b52bd81d674312966c1fe2852ba2","unresolved":false,"context_lines":[{"line_number":58,"context_line":"        # Look for possible policy issues."},{"line_number":59,"context_line":"        # We want the older storage policy"},{"line_number":60,"context_line":"        policy_mismatch \u003d False"},{"line_number":61,"context_line":"        if my_policy !\u003d policy:"},{"line_number":62,"context_line":"            if my_put_timestamp \u003e put_timestamp:"},{"line_number":63,"context_line":"                policy_mismatch \u003d True"},{"line_number":64,"context_line":"            elif my_put_timestamp \u003d\u003d put_timestamp:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAASn%2F%2F12M%3D","line":61,"updated":"2013-08-28 22:32:20.000000000","message":"\"my_policy\" and \"policy\"? Would you consider \"my_policy\" and \"their_policy\" or \"this_policy\" and \"other_policy\" instead?","commit_id":"74f22a204cd079c2ce1fa1912f7178e0766b98e2"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"ffcff5bc7bb3b52bd81d674312966c1fe2852ba2","unresolved":false,"context_lines":[{"line_number":62,"context_line":"            if my_put_timestamp \u003e put_timestamp:"},{"line_number":63,"context_line":"                policy_mismatch \u003d True"},{"line_number":64,"context_line":"            elif my_put_timestamp \u003d\u003d put_timestamp:"},{"line_number":65,"context_line":"                # Use sync points as a tie breaker"},{"line_number":66,"context_line":"                if my_info[\u0027point\u0027] \u003e remote_sync:"},{"line_number":67,"context_line":"                    policy_mismatch \u003d True"},{"line_number":68,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAASn%2F%2F15I%3D","line":65,"updated":"2013-08-28 22:32:20.000000000","message":"I\u0027d just use policy numbers and pick the min (or max, or number of distinct prime factors...). Sync points might match so we can\u0027t rely on those, but if we\u0027ve got a policy mismatch, the one thing we *know* is different is the policy number. :)","commit_id":"74f22a204cd079c2ce1fa1912f7178e0766b98e2"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"437c74e3c0bc89a5ff5b497317cedf44f07f97d4","unresolved":false,"context_lines":[{"line_number":18,"context_line":"from eventlet import Timeout"},{"line_number":19,"context_line":"from gettext import gettext as _"},{"line_number":20,"context_line":"from swift.common.db_replicator import ReplicatorRpc, quarantine_db"},{"line_number":21,"context_line":"from swift.proxy.controllers.base import POLICY_INDEX"},{"line_number":22,"context_line":"from swift.common.swob import HTTPNotFound"},{"line_number":23,"context_line":"from swift.common.utils import normalize_timestamp"},{"line_number":24,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAS3%2F%2Fj4E%3D","line":21,"updated":"2013-09-24 17:43:03.000000000","message":"Note that I moved the definition of POLICY_INDEX but you\u0027ll see that when you rebase","commit_id":"6599fb64eae18a3258850f5c49efd4fafb28f4f0"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"437c74e3c0bc89a5ff5b497317cedf44f07f97d4","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        other_metadata \u003d simplejson.loads(other_metadata or \u0027{}\u0027)"},{"line_number":75,"context_line":"        other_policy_index \u003d self.get_index(other_metadata)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        # Look for possible policy issues."},{"line_number":78,"context_line":"        # We want the older storage policy"},{"line_number":79,"context_line":"        policy_mismatch \u003d False"},{"line_number":80,"context_line":"        if this_policy_index !\u003d other_policy_index:"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAS3%2F%2FjzA%3D","line":77,"updated":"2013-09-24 17:43:03.000000000","message":"here through the next if block at 89 are a bit confusing for me at least.  Seems like here you want to determine if there\u0027s a mismatch but if this \u003c other than mismatch is still False, right?  In that case you\u0027d end up falling into the elif in 102 which I\u0027m not sure was the intent.  I could be totally missing the boat here, maybe if you could walk through the logic between here and 111 that would help","commit_id":"6599fb64eae18a3258850f5c49efd4fafb28f4f0"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"d6c00fe1c2dfcf1f3970c9015fb90778e7e15421","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        other_metadata \u003d simplejson.loads(other_metadata or \u0027{}\u0027)"},{"line_number":75,"context_line":"        other_policy_index \u003d self.get_index(other_metadata)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        # Look for possible policy issues."},{"line_number":78,"context_line":"        # We want the older storage policy"},{"line_number":79,"context_line":"        policy_mismatch \u003d False"},{"line_number":80,"context_line":"        if this_policy_index !\u003d other_policy_index:"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAS3%2F%2FjOY%3D","line":77,"in_reply_to":"AAAAS3%2F%2FjTI%3D","updated":"2013-09-24 19:55:46.000000000","message":"yup, that would make it clearer and differentiate a \"a change is needed\" from \"a difference\" (line 102).  thanks","commit_id":"6599fb64eae18a3258850f5c49efd4fafb28f4f0"},{"author":{"_account_id":8600,"name":"James Absalon","email":"james.absalon@rackspace.com","username":"JamesAbsalon"},"change_message_id":"7a3cd44dcf7e062ba4788fa7a73e21595731932b","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        other_metadata \u003d simplejson.loads(other_metadata or \u0027{}\u0027)"},{"line_number":75,"context_line":"        other_policy_index \u003d self.get_index(other_metadata)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        # Look for possible policy issues."},{"line_number":78,"context_line":"        # We want the older storage policy"},{"line_number":79,"context_line":"        policy_mismatch \u003d False"},{"line_number":80,"context_line":"        if this_policy_index !\u003d other_policy_index:"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAS3%2F%2FjTI%3D","line":77,"in_reply_to":"AAAAS3%2F%2FjzA%3D","updated":"2013-09-24 19:31:35.000000000","message":"Sorry for the confusion.  Perhaps I should rename policy_mismatch to policy_change.  If this container is the older container and the newer container has a different policy, this container will not adopt the newer policy.  If there is a policy difference and no policy change, steps will be taken to preserve the correct policy.  Eventually, this container will make a replication request to the newer container, at which point the newer container will adopt the older policy.","commit_id":"6599fb64eae18a3258850f5c49efd4fafb28f4f0"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"437c74e3c0bc89a5ff5b497317cedf44f07f97d4","unresolved":false,"context_lines":[{"line_number":81,"context_line":"            if this_put_timestamp \u003e other_put_timestamp:"},{"line_number":82,"context_line":"                policy_mismatch \u003d True"},{"line_number":83,"context_line":"            elif this_put_timestamp \u003d\u003d other_put_timestamp:"},{"line_number":84,"context_line":"                # Use max of policy indexes when put_timestamps are the same"},{"line_number":85,"context_line":"                chosen_index \u003d max(this_policy_index, other_policy_index)"},{"line_number":86,"context_line":"                if not this_policy_index \u003d\u003d chosen_index:"},{"line_number":87,"context_line":"                    policy_mismatch \u003d True"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAS3%2F%2Fj2A%3D","line":84,"updated":"2013-09-24 17:43:03.000000000","message":"can\u0027t remember if this was discussed, was there a reason for using the highest or is this just a rule to be consistent?","commit_id":"6599fb64eae18a3258850f5c49efd4fafb28f4f0"},{"author":{"_account_id":8600,"name":"James Absalon","email":"james.absalon@rackspace.com","username":"JamesAbsalon"},"change_message_id":"7a3cd44dcf7e062ba4788fa7a73e21595731932b","unresolved":false,"context_lines":[{"line_number":81,"context_line":"            if this_put_timestamp \u003e other_put_timestamp:"},{"line_number":82,"context_line":"                policy_mismatch \u003d True"},{"line_number":83,"context_line":"            elif this_put_timestamp \u003d\u003d other_put_timestamp:"},{"line_number":84,"context_line":"                # Use max of policy indexes when put_timestamps are the same"},{"line_number":85,"context_line":"                chosen_index \u003d max(this_policy_index, other_policy_index)"},{"line_number":86,"context_line":"                if not this_policy_index \u003d\u003d chosen_index:"},{"line_number":87,"context_line":"                    policy_mismatch \u003d True"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAS3%2F%2FjSs%3D","line":84,"in_reply_to":"AAAAS3%2F%2Fj2A%3D","updated":"2013-09-24 19:31:35.000000000","message":"There really was no reason. I just picked something to be consistent when put timestamps are the same.","commit_id":"6599fb64eae18a3258850f5c49efd4fafb28f4f0"}],"test/unit/container/test_replicator_rpc.py":[{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"437c74e3c0bc89a5ff5b497317cedf44f07f97d4","unresolved":false,"context_lines":[{"line_number":41,"context_line":"    Taken from test_db_replicator.  Mostly duplicated with some additional"},{"line_number":42,"context_line":"    functions"},{"line_number":43,"context_line":"    \"\"\""},{"line_number":44,"context_line":"    # Daniel Curren pointed out that db_file should be fake."},{"line_number":45,"context_line":"    # When the quarantine_db occurs for test_fail_table, actual files"},{"line_number":46,"context_line":"    # may get deleted if this is something real"},{"line_number":47,"context_line":"    db_file \u003d \"asdfhaklsjfhasd\""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAS3%2F%2FjyI%3D","line":44,"updated":"2013-09-24 17:43:03.000000000","message":"seems like a strange comment to check in (first sentence needed?)","commit_id":"6599fb64eae18a3258850f5c49efd4fafb28f4f0"}]}
