)]}'
{"swift/common/storage_policy.py":[{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"8a24584358219f5536b6eb35da2e586ef1a682e5","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        Quorum concept in the replication case:"},{"line_number":171,"context_line":"        floor(number of replica / 2) + 1"},{"line_number":172,"context_line":"        \"\"\""},{"line_number":173,"context_line":"        return (n // 2) + 1"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"class ECStoragePolicy(StoragePolicy):"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_d04bd925","line":173,"updated":"2014-08-04 04:26:39.000000000","message":"Seeing as this is the default version of quorum_size (used for account and containers), instead of redefining, can it use the exiting method?\n\n    from swift.common.utils import quorum_size\n    \n    def quorum_size(self, n):\n        return quorum_size(n)\n\nFurther, because every Storage_policy will require a quorum_size, it would be nice to either move this to the parent class (forcing SP classes to override) or put a blank quorum_size method that logs to the error file forcing a dev to override the method rather then leaving it out.","commit_id":"410ef1725cf14e75ea25cf290c636cfc3c9dd2f2"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"57fc30a76a3cfdf7e94a9e0c1d1dd58b862cd287","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        Quorum concept in the replication case:"},{"line_number":171,"context_line":"        floor(number of replica / 2) + 1"},{"line_number":172,"context_line":"        \"\"\""},{"line_number":173,"context_line":"        return (n // 2) + 1"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"class ECStoragePolicy(StoragePolicy):"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_70a20d9b","line":173,"in_reply_to":"baada198_d04bd925","updated":"2014-08-04 04:37:41.000000000","message":"Thanks Matt for the review.  The intent was to make it explicit that each Policy class implements its own quorum_size().  Let me see if I can clean this up a bit.\n\nI went back and forth on making it an abstract method .. let me add it back.","commit_id":"410ef1725cf14e75ea25cf290c636cfc3c9dd2f2"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"6a8b80a8881ec2a53ec1361d0b373800005ce84b","unresolved":false,"context_lines":[{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    def validate_ring_node_count(self):"},{"line_number":175,"context_line":"        \"\"\""},{"line_number":176,"context_line":"        No validation needed here.  We can assume that the number of replicas"},{"line_number":177,"context_line":"        configured is how many copies of the data the user meant to store"},{"line_number":178,"context_line":"        \"\"\""},{"line_number":179,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":4,"id":"1abeadc6_a97540cc","line":176,"updated":"2014-08-21 13:14:13.000000000","message":"For someone just looking at this, the comment I think can confuse.  I\u0027d just put \"The replication policy doesn\u0027t have any internal dependencies on the node count, test is N/A.\"","commit_id":"5e4c62efcb5f0cf0aa6ca931ead7106510a96990"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"349c72e606bef5ae50ee47f605e47dfc09398719","unresolved":false,"context_lines":[{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    def validate_ring_node_count(self):"},{"line_number":175,"context_line":"        \"\"\""},{"line_number":176,"context_line":"        No validation needed here.  We can assume that the number of replicas"},{"line_number":177,"context_line":"        configured is how many copies of the data the user meant to store"},{"line_number":178,"context_line":"        \"\"\""},{"line_number":179,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":4,"id":"1abeadc6_a206321b","line":176,"in_reply_to":"1abeadc6_a97540cc","updated":"2014-08-21 16:13:38.000000000","message":"Sure.  It looks sufficient to say that. Done.","commit_id":"5e4c62efcb5f0cf0aa6ca931ead7106510a96990"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"6a8b80a8881ec2a53ec1361d0b373800005ce84b","unresolved":false,"context_lines":[{"line_number":182,"context_line":"        \"\"\""},{"line_number":183,"context_line":"        Number of successful backend requests needed for the proxy to"},{"line_number":184,"context_line":"        consider the client request successful."},{"line_number":185,"context_line":"        Quorum concept in the replication case:"},{"line_number":186,"context_line":"            floor(number of replica / 2) + 1"},{"line_number":187,"context_line":"        \"\"\""},{"line_number":188,"context_line":"        return replication_quorum_size(n)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1abeadc6_4406531e","line":185,"updated":"2014-08-21 13:14:13.000000000","message":"remove these last 2 lines of comment as they are talking about what\u0027s defined over in the the function you\u0027re importing from utils.py","commit_id":"5e4c62efcb5f0cf0aa6ca931ead7106510a96990"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"349c72e606bef5ae50ee47f605e47dfc09398719","unresolved":false,"context_lines":[{"line_number":182,"context_line":"        \"\"\""},{"line_number":183,"context_line":"        Number of successful backend requests needed for the proxy to"},{"line_number":184,"context_line":"        consider the client request successful."},{"line_number":185,"context_line":"        Quorum concept in the replication case:"},{"line_number":186,"context_line":"            floor(number of replica / 2) + 1"},{"line_number":187,"context_line":"        \"\"\""},{"line_number":188,"context_line":"        return replication_quorum_size(n)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1abeadc6_42b71e3a","line":185,"in_reply_to":"1abeadc6_4406531e","updated":"2014-08-21 16:13:38.000000000","message":":)  thought it would help to keep it here for a reader that\u0027s trying compare this with the EC quorum_size .. not needed and in fact could be a problem in case the utils function changes .. will remove this.","commit_id":"5e4c62efcb5f0cf0aa6ca931ead7106510a96990"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"6a8b80a8881ec2a53ec1361d0b373800005ce84b","unresolved":false,"context_lines":[{"line_number":246,"context_line":"                              \"Unsupported ec_type: %s for policy %s\""},{"line_number":247,"context_line":"                              % (self._ec_type, self.name))"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"        # quorum_size is the minimum number of data + parity elements required"},{"line_number":250,"context_line":"        # to be able to guarantee the desired fault tolerance, which is the"},{"line_number":251,"context_line":"        # number of data elements supplemented by the minimum number of parity"},{"line_number":252,"context_line":"        # elements required by the chosen erasure coding scheme.  For example,"}],"source_content_type":"text/x-python","patch_set":4,"id":"1abeadc6_a4b1e790","line":249,"updated":"2014-08-21 13:14:13.000000000","message":"Looking for thoughts here, we defined a quorum as being data + 1 however that assumes that someone using EC things that having just 1 parity is sufficient - it doesn\u0027t scale.  For Repl, example the formula scales with the number of replicas.  I wonder if we keep the API as is but add a swift.conf parm in the policy that says \"additional_quorum_adder\" or something so that, for example, someone using 10:4 can choose 13 as their quorum size instead of being stuck with 11.  You\u0027d have to put a quick check in policy validation to make sure they didn\u0027t put a bogus number in there for the given policy and then you\u0027d have to reword this slightly but I think its worth doing.\n\nSo, the comment might read:\n\n# quorum_size is the minimum number of elements required to assure  durability with some level of fault tolerance.  The value depends on both the EC scheme chosen as well as the minimum required level of durability desired by the policy. For example, with a  Reed Solomon 10:4 scheme, a quarum size as shown below would use min_parity_fragments_needed() which would be 1.  The requirement can be tightened by configuring \"additional_quarum_adder\" in the relevant policy section of swift.conf","commit_id":"5e4c62efcb5f0cf0aa6ca931ead7106510a96990"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"349c72e606bef5ae50ee47f605e47dfc09398719","unresolved":false,"context_lines":[{"line_number":246,"context_line":"                              \"Unsupported ec_type: %s for policy %s\""},{"line_number":247,"context_line":"                              % (self._ec_type, self.name))"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"        # quorum_size is the minimum number of data + parity elements required"},{"line_number":250,"context_line":"        # to be able to guarantee the desired fault tolerance, which is the"},{"line_number":251,"context_line":"        # number of data elements supplemented by the minimum number of parity"},{"line_number":252,"context_line":"        # elements required by the chosen erasure coding scheme.  For example,"}],"source_content_type":"text/x-python","patch_set":4,"id":"1abeadc6_2db7733b","line":249,"in_reply_to":"1abeadc6_a4b1e790","updated":"2014-08-21 16:13:38.000000000","message":"This was written more from a GET point of view .. I see your point.\n\nThat said, we are making \u0027quorum_size\u0027 configurable per storage policy here .. so I don\u0027t see why we cannot make it configurable at the swift.conf level .. we certainly need some more thinking around whether we expose an \u0027adder\u0027 or the \u0027quorum_size\u0027 itself .. let me put a card on Trello.","commit_id":"5e4c62efcb5f0cf0aa6ca931ead7106510a96990"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"6a8b80a8881ec2a53ec1361d0b373800005ce84b","unresolved":false,"context_lines":[{"line_number":266,"context_line":"        \"\"\""},{"line_number":267,"context_line":"        EC specific validation"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"        Replica count check - we need _at_least_ (#data + #parity) replicas"},{"line_number":270,"context_line":"        configured.  Also if the replica count is larger than exactly that"},{"line_number":271,"context_line":"        number, we may confuse the EC reconstructor"},{"line_number":272,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"1abeadc6_5f07fa17","line":269,"updated":"2014-08-21 13:14:13.000000000","message":"note we have a trello card for someone to cleanup all the \"replica count\" and change to \"node count\" - might as change this one while you\u0027re here","commit_id":"5e4c62efcb5f0cf0aa6ca931ead7106510a96990"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"349c72e606bef5ae50ee47f605e47dfc09398719","unresolved":false,"context_lines":[{"line_number":266,"context_line":"        \"\"\""},{"line_number":267,"context_line":"        EC specific validation"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"        Replica count check - we need _at_least_ (#data + #parity) replicas"},{"line_number":270,"context_line":"        configured.  Also if the replica count is larger than exactly that"},{"line_number":271,"context_line":"        number, we may confuse the EC reconstructor"},{"line_number":272,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"1abeadc6_024d263e","line":269,"in_reply_to":"1abeadc6_5f07fa17","updated":"2014-08-21 16:13:38.000000000","message":"Missed this one reference .. the rest of the code shoud already have the change.  Thanks","commit_id":"5e4c62efcb5f0cf0aa6ca931ead7106510a96990"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"06cb3f59fed501a0f9e155176e19ee6f7f70a0f6","unresolved":false,"context_lines":[{"line_number":151,"context_line":""},{"line_number":152,"context_line":"    def quorum_size(self, n):"},{"line_number":153,"context_line":"        if self.__class__ \u003d\u003d StoragePolicy:"},{"line_number":154,"context_line":"            raise TypeError(\"quorum_size for base StoragePolicy class is \""},{"line_number":155,"context_line":"                            \"not defined\")"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1abeadc6_19491d31","line":154,"updated":"2014-08-28 19:07:39.000000000","message":"A couple things:\n\nFirst, I\u0027d use NotImplementedError here instead of TypeError.\n\nSecond, you mustn\u0027t check self.__class__; if a subclass has a quorum_size() method, it\u0027ll shadow this one. If a subclass doesn\u0027t, then this method will be called, but self.__class__ will be SomeStoragePolicySubclass, and so you won\u0027t get the error, but rather a None.","commit_id":"e105999f37cac0a9cd5e57f9c07cfca65f214480"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"06cb3f59fed501a0f9e155176e19ee6f7f70a0f6","unresolved":false,"context_lines":[{"line_number":274,"context_line":"            nodes_configured \u003d self.object_ring.replica_count"},{"line_number":275,"context_line":"            if nodes_configured !\u003d (self.ec_ndata + self.ec_nparity):"},{"line_number":276,"context_line":"                raise RingValidationError("},{"line_number":277,"context_line":"                    \u0027EC ring does not appear to have enough nodes configured. \u0027"},{"line_number":278,"context_line":"                    \u0027Got %d, need (%d + %d)\u0027"},{"line_number":279,"context_line":"                    % (nodes_configured, self.ec_ndata, self.ec_nparity))"},{"line_number":280,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1abeadc6_b9e4a9e0","line":277,"updated":"2014-08-28 19:07:39.000000000","message":"Might want to adjust the wording here away from \"enough\"; it could be either too few or too many.","commit_id":"e105999f37cac0a9cd5e57f9c07cfca65f214480"}],"swift/common/utils.py":[{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"37da4a734c21c37c0f31c9607b820f61f263f6ce","unresolved":false,"context_lines":[{"line_number":2425,"context_line":"    return wrapped"},{"line_number":2426,"context_line":""},{"line_number":2427,"context_line":""},{"line_number":2428,"context_line":"def ac_quorum_size(n):"},{"line_number":2429,"context_line":"    \"\"\""},{"line_number":2430,"context_line":"    quorum size as it applies to Account/Container services"},{"line_number":2431,"context_line":"    Object quorum_size is defined on a storage policy basis"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_24f914c5","line":2428,"updated":"2014-08-04 23:52:17.000000000","message":"s/ac_quorum_size/replication_quorum_size","commit_id":"410ef1725cf14e75ea25cf290c636cfc3c9dd2f2"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"8a24584358219f5536b6eb35da2e586ef1a682e5","unresolved":false,"context_lines":[{"line_number":2433,"context_line":"    Number of successful backend requests needed for the proxy to consider"},{"line_number":2434,"context_line":"    the client request successful."},{"line_number":2435,"context_line":"    \"\"\""},{"line_number":2436,"context_line":"    return (n // 2) + 1"},{"line_number":2437,"context_line":""},{"line_number":2438,"context_line":""},{"line_number":2439,"context_line":"def rsync_ip(ip):"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_d01039f6","line":2436,"updated":"2014-08-04 04:26:39.000000000","message":"If this method ends up being used in the replication_policy class, can this still be referred to as simply quorum_size, a note in the doc string could be made to say the storage policy classes override this method.\n\nAs personally, prepending ac_ doesn\u0027t read as nice to me.","commit_id":"410ef1725cf14e75ea25cf290c636cfc3c9dd2f2"},{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"57fc30a76a3cfdf7e94a9e0c1d1dd58b862cd287","unresolved":false,"context_lines":[{"line_number":2433,"context_line":"    Number of successful backend requests needed for the proxy to consider"},{"line_number":2434,"context_line":"    the client request successful."},{"line_number":2435,"context_line":"    \"\"\""},{"line_number":2436,"context_line":"    return (n // 2) + 1"},{"line_number":2437,"context_line":""},{"line_number":2438,"context_line":""},{"line_number":2439,"context_line":"def rsync_ip(ip):"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_30317559","line":2436,"in_reply_to":"baada198_d01039f6","updated":"2014-08-04 04:37:41.000000000","message":"Technically not the same method gets used in replication policy, but the same body ;)  \"ac_\" was an attempt to make it explicit that this method is used by account and container given we don\u0027t implement policies for those.","commit_id":"410ef1725cf14e75ea25cf290c636cfc3c9dd2f2"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"06cb3f59fed501a0f9e155176e19ee6f7f70a0f6","unresolved":false,"context_lines":[{"line_number":2451,"context_line":""},{"line_number":2452,"context_line":"def replication_quorum_size(n):"},{"line_number":2453,"context_line":"    \"\"\""},{"line_number":2454,"context_line":"    quorum size as it applies to services that still use \u0027replication\u0027"},{"line_number":2455,"context_line":"    for data integrity  (Account/Container services).  Object quorum_size"},{"line_number":2456,"context_line":"    is defined on a storage policy basis"},{"line_number":2457,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1abeadc6_f9546155","line":2454,"updated":"2014-08-28 19:07:39.000000000","message":"nit: remove the word \"still\" from here, as it implies replication is going away, which it is not","commit_id":"e105999f37cac0a9cd5e57f9c07cfca65f214480"}],"swift/proxy/controllers/base.py":[{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"f1e316a98e3d193a76e75f0b87a91dec8dcd369a","unresolved":false,"context_lines":[{"line_number":1088,"context_line":"        a quorum response can already be decided."},{"line_number":1089,"context_line":""},{"line_number":1090,"context_line":"        :param statuses: list of statuses returned"},{"line_number":1091,"context_line":"        :param node_count: number of nodes being queried (basically ring count)"},{"line_number":1092,"context_line":"        :returns: True or False, depending on if quorum is established"},{"line_number":1093,"context_line":"        \"\"\""},{"line_number":1094,"context_line":"        quorum \u003d self._quorum_size(node_count, policy_index)"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_64bcecdb","line":1091,"updated":"2014-08-04 23:45:32.000000000","message":"missing param comment","commit_id":"410ef1725cf14e75ea25cf290c636cfc3c9dd2f2"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"06cb3f59fed501a0f9e155176e19ee6f7f70a0f6","unresolved":false,"context_lines":[{"line_number":1071,"context_line":"            statuses.append(resp[0])"},{"line_number":1072,"context_line":"            policy_index \u003d req.headers.get("},{"line_number":1073,"context_line":"                \u0027X-Backend-Storage-Policy-Index\u0027, None)"},{"line_number":1074,"context_line":"            if self.have_quorum(statuses, len(start_nodes), policy_index):"},{"line_number":1075,"context_line":"                break"},{"line_number":1076,"context_line":"        # give any pending requests *some* chance to finish"},{"line_number":1077,"context_line":"        pile.waitall(self.app.post_quorum_timeout)"}],"source_content_type":"text/x-python","patch_set":5,"id":"1abeadc6_bca2d7f9","line":1074,"updated":"2014-08-28 19:07:39.000000000","message":"Instead of leaking this knowledge into the base class, can we instead pass req to have_quorum() and keep the per-policy stuff up in controllers/obj.py? It means an extra parameter in the base controller\u0027s have_quorum, yes, but that strikes me as cleaner than fishing out an obj-specific header in the base class.","commit_id":"e105999f37cac0a9cd5e57f9c07cfca65f214480"}],"test/unit/proxy/controllers/test_base.py":[{"author":{"_account_id":7485,"name":"Tushar Gohad","email":"tushar.gohad@intel.com","username":"tsg"},"change_message_id":"37da4a734c21c37c0f31c9607b820f61f263f6ce","unresolved":false,"context_lines":[{"line_number":542,"context_line":"            headers_to_object_info(headers.items(), 200))"},{"line_number":543,"context_line":""},{"line_number":544,"context_line":"    def test_have_quorum(self):"},{"line_number":545,"context_line":"        base \u003d Controller(self.app)"},{"line_number":546,"context_line":"        # just throw a bunch of test cases at it"},{"line_number":547,"context_line":"        self.assertEqual(base.have_quorum([201, 404], 3), False)"},{"line_number":548,"context_line":"        self.assertEqual(base.have_quorum([201, 201], 4), False)"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_8494a036","side":"PARENT","line":545,"updated":"2014-08-04 23:52:17.000000000","message":"Add this test case back with a fake _quorum_size() routine","commit_id":"5da30cb59e19feafe152a750e59374ce93d22602"}]}
