)]}'
{"swift/common/ring/composite_builder.py":[{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"93c93ba569bbc0463ca0665792df9b2ce11ae936","unresolved":false,"context_lines":[{"line_number":56,"context_line":"For rings to be formed into a composite they must satisfy the following"},{"line_number":57,"context_line":"requirements:"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"* All component rings must have the same number of partitions"},{"line_number":60,"context_line":"* Each region may only be used in one component ring"},{"line_number":61,"context_line":"* Each device may only be used in one component ring"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"Under the hood, the composite ring has a replica2part2dev_id table that is the"},{"line_number":64,"context_line":"union of the tables from the component rings. Whenever the component rings are"}],"source_content_type":"text/x-python","patch_set":2,"id":"ffe62b97_9441ffa8","line":61,"range":{"start_line":59,"start_character":0,"end_line":61,"end_character":52},"updated":"2017-03-30 06:08:35.000000000","message":"Now, I\u0027m realizing we may need one more requirement\n\n- All component rings has integer replica count (not float)\n\nIt may be possible to concatenate the replica2part2dev tables with floating point replica rings but IIRC, the composite ring for them will be like:\n\n ring0 -\u003e 1.5 replicas\n ring1 -\u003e 2.5 replicas\n\n () -\u003e a device id\n [] -\u003e a python list\n\n composite ring:\n\n     p0  p1  ...  pN/2 pN/2+1 ...   pN\n r0 [(), (), ... , (),  (),   ... , ()]\n r1 [(), (), ... , ()]\n r2 [(), (), ... , (),  (),   ... , ()]\n r3 [(), (), ... , (),  (),   ... , ()]\n r4 [(), (), ... , ()]\n\n\nMy quick check with:\ndiff --git a/test/unit/common/ring/test_composite_builder.py b/test/unit/common/ring/test_composite_builder.py\nindex 73b7017..fa3a7e0 100644\n--- a/test/unit/common/ring/test_composite_builder.py\n+++ b/test/unit/common/ring/test_composite_builder.py\n@@ -66,7 +66,7 @@ class TestCompositeRingBuilder(unittest.TestCase):\n         tmp_builders \u003d []\n         for region in range(num_builders):\n             fname \u003d os.path.join(self.tmpdir, \u0027builder_%s.builder\u0027 % region)\n-            builder \u003d RingBuilder(6, 3, 1, source\u003dfname)\n+            builder \u003d RingBuilder(6, 3.2, 1, source\u003dfname)\n             for _ in range(5):\n                 dev \u003d self.pop_region_device(region)\n                 builder.add_dev(dev)\n\nSome of tests failed and it looks like RingData instance also doesn\u0027t care of the floating replica count because it returns just a length of the first line of the table.\n\nProbably, we should add the assertion in the parent patch.","commit_id":"5b60ef274655ae455e2aa7b903c5f8e367dc6f7c"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"93c93ba569bbc0463ca0665792df9b2ce11ae936","unresolved":false,"context_lines":[{"line_number":65,"context_line":"rebalanced, the composite ring must be rebuilt. There is no dynamic rebuilding"},{"line_number":66,"context_line":"of the composite ring."},{"line_number":67,"context_line":""},{"line_number":68,"context_line":".. note::"},{"line_number":69,"context_line":"    The order in which component rings are combined into a composite ring is"},{"line_number":70,"context_line":"    very significant because it determines the order in which the"},{"line_number":71,"context_line":"    Ring.get_part_nodes() method will provide primary nodes for the composite"},{"line_number":72,"context_line":"    ring and consequently the node_indexes assigned to the primaries. For an"},{"line_number":73,"context_line":"    erasure-coded policy, inadvertent changes to the primary node_indexes could"},{"line_number":74,"context_line":"    result in large amounts of data movement due to fragments being moved to"},{"line_number":75,"context_line":"    their new correct primary."},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    The \u0027source\u0027 of each component ring (typically the name of the builder"},{"line_number":78,"context_line":"    file) is therefore stored in metadata of the composite and used to check"},{"line_number":79,"context_line":"    when the same composite ring is re-composed."},{"line_number":80,"context_line":"\"\"\""},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"import copy"}],"source_content_type":"text/x-python","patch_set":2,"id":"ffe62b97_bea98424","line":79,"range":{"start_line":68,"start_character":0,"end_line":79,"end_character":48},"updated":"2017-03-30 06:08:35.000000000","message":"Good notation.","commit_id":"5b60ef274655ae455e2aa7b903c5f8e367dc6f7c"}]}
