)]}'
{"etc/container-server.conf-sample":[{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"4dca4ba3bf550c560dc242636fac2b05f0d43511","unresolved":false,"context_lines":[{"line_number":115,"context_line":"# of run_pause."},{"line_number":116,"context_line":"# run_pause \u003d 30"},{"line_number":117,"context_line":"#"},{"line_number":118,"context_line":"# When using rsync, compress data during the transfer to a node in"},{"line_number":119,"context_line":"# different region"},{"line_number":120,"context_line":"# rsync_compress \u003d no"},{"line_number":121,"context_line":"#"}],"source_content_type":"application/octet-stream","patch_set":2,"id":"1a930d6b_17c5dc3b","line":118,"updated":"2015-01-22 13:07:28.000000000","message":"can you maybe expand on this (and in all the sample files) a little since this is where most users will read about the feature?  The code comments are worded more clearly - just a few more words can make all the difference :)","commit_id":"1ae093b6aebe9198d6a437d990bc2efda6eeb683"},{"author":{"_account_id":8542,"name":"Prashanth Pai","email":"ppai@redhat.com","username":"pai"},"change_message_id":"54a81905e67b3721d5f560a70554fb60097e83d7","unresolved":false,"context_lines":[{"line_number":115,"context_line":"# of run_pause."},{"line_number":116,"context_line":"# run_pause \u003d 30"},{"line_number":117,"context_line":"#"},{"line_number":118,"context_line":"# When using rsync, compress data during the transfer to a node in"},{"line_number":119,"context_line":"# different region"},{"line_number":120,"context_line":"# rsync_compress \u003d no"},{"line_number":121,"context_line":"#"}],"source_content_type":"application/octet-stream","patch_set":2,"id":"1a930d6b_18a0a99e","line":118,"in_reply_to":"1a930d6b_17c5dc3b","updated":"2015-01-22 14:13:10.000000000","message":"Thanks Paul. Will do.","commit_id":"1ae093b6aebe9198d6a437d990bc2efda6eeb683"}],"swift/common/db_replicator.py":[{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"29096f155adf392ceabc0c5b5708d2070451350f","unresolved":false,"context_lines":[{"line_number":232,"context_line":"        if self.rsync_compress and different_region:"},{"line_number":233,"context_line":"            # Allow for compression, but only if the remote node is in"},{"line_number":234,"context_line":"            # a different region than the local one."},{"line_number":235,"context_line":"            popen_args.append(\u0027--compress\u0027)"},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"        popen_args.extend([db_file, remote_file])"},{"line_number":238,"context_line":"        proc \u003d subprocess.Popen(popen_args)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_00b02f42","line":235,"updated":"2015-01-22 15:58:10.000000000","message":"this is what I\u0027m showing as now test coverage, previous line partial","commit_id":"8fa40d052fcd856f34edc50d63f2443e25a9a23d"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"64e849653e9b2775774196a093556c9aba9698a3","unresolved":false,"context_lines":[{"line_number":487,"context_line":"        local_dev \u003d None"},{"line_number":488,"context_line":"        for node in nodes:"},{"line_number":489,"context_line":"            if node[\u0027id\u0027] \u003d\u003d node_id:"},{"line_number":490,"context_line":"                local_dev \u003d node"},{"line_number":491,"context_line":"        if shouldbehere:"},{"line_number":492,"context_line":"            shouldbehere \u003d bool([n for n in nodes if n[\u0027id\u0027] \u003d\u003d node_id])"},{"line_number":493,"context_line":"        # See Footnote [1] for an explanation of the repl_nodes assignment."}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_49f41bf2","line":490,"updated":"2015-01-22 19:13:55.000000000","message":"nit: add a break statement after the assignment for efficiency\u0027s sake","commit_id":"8fa40d052fcd856f34edc50d63f2443e25a9a23d"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"64e849653e9b2775774196a093556c9aba9698a3","unresolved":false,"context_lines":[{"line_number":501,"context_line":"                # This additional information will help later if we"},{"line_number":502,"context_line":"                # want to handle syncing to a node in different"},{"line_number":503,"context_line":"                # region with some optimizations."},{"line_number":504,"context_line":"                node[\u0027different_region\u0027] \u003d True"},{"line_number":505,"context_line":"            success \u003d False"},{"line_number":506,"context_line":"            try:"},{"line_number":507,"context_line":"                success \u003d self._repl_to_node(node, broker, partition, info)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_69f717f6","line":504,"updated":"2015-01-22 19:13:55.000000000","message":"It\u0027s usually not a good idea to modify the ring nodes. get_nodes() and get_more_nodes() don\u0027t return copies of the ring\u0027s internal data structures; they just return references. This \"different_region\" field will persist across multiple invocations of this method, whether you want it to or not.\n\nMuch better to either (a) copy the node dict, or (b) store the information in a local variable instead.","commit_id":"8fa40d052fcd856f34edc50d63f2443e25a9a23d"},{"author":{"_account_id":8542,"name":"Prashanth Pai","email":"ppai@redhat.com","username":"pai"},"change_message_id":"c759f264aa3470db2c5bec1acb56848f909fff0a","unresolved":false,"context_lines":[{"line_number":231,"context_line":""},{"line_number":232,"context_line":"        if self.rsync_compress and different_region:"},{"line_number":233,"context_line":"            # Allow for compression, but only if the remote node is in"},{"line_number":234,"context_line":"            # a different region than the local one."},{"line_number":235,"context_line":"            popen_args.append(\u0027--compress\u0027)"},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"        popen_args.extend([db_file, remote_file])"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a930d6b_268063bf","line":234,"updated":"2015-01-27 06:40:48.000000000","message":"That\u0027s a very valid concern Thiago. I had came across it. It was one of the reasons why this option is configurable and off by default.\n\nThere are two theoretical fixes that I could think of. It\u0027s not worth the effort as it involves additional i/o.\n\n1. Identify file by it\u0027s magic number (involves reading first few bytes of file!)\n\n    \u003e\u003e\u003e import magic\n    \u003e\u003e\u003e magic.from_file(\"/mnt/sdb1/./4/node/sdb4/objects/353/cd7/58482e05ea78310c6235c122e6e6acd7/1422340665.22984.data\")\n    \u0027JPEG image data, JFIF standard 1.01, comment: \"CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), default quality\"\u0027\n    \u003e\u003e\u003e \n\n2. Read the \u0027name\u0027 key (to figure out extension) OR \u0027Content-Type\u0027 from dict stored in user.swift.metadata xattr.\n\nAs you mentioned, I don\u0027t think there\u0027s much we can do about it right now except document it in conf file so that operator can make an informed decision.","commit_id":"438ca0134da06fa797ae9e5f6b2a8e909a800252"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"497b291d5fe8fd0ab652bcad14cf3868de083d46","unresolved":false,"context_lines":[{"line_number":498,"context_line":"        for node in nodes:"},{"line_number":499,"context_line":"            if node[\u0027id\u0027] \u003d\u003d node_id:"},{"line_number":500,"context_line":"                local_dev \u003d node"},{"line_number":501,"context_line":"                break"},{"line_number":502,"context_line":"        if shouldbehere:"},{"line_number":503,"context_line":"            shouldbehere \u003d bool([n for n in nodes if n[\u0027id\u0027] \u003d\u003d node_id])"},{"line_number":504,"context_line":"        # See Footnote [1] for an explanation of the repl_nodes assignment."}],"source_content_type":"text/x-python","patch_set":6,"id":"da86d52c_50b90678","line":501,"updated":"2015-02-17 01:47:42.000000000","message":"I\u0027m not sure but L512 seems to care about the case the local device is in the handoff node. (i.e. local_dev would not be in \"nodes\" list, and then, \"local_dev\" would be None here.) It means the handoff node couldn\u0027t use compression efficiency.\n\nTo take care of that case, I would like to suggest to make this for-loop be against self.ring.devs like as:\n\nfor node in self.ring.devs:\n\nIf we do so, we could always achieve the compression efficiency between the regions, however, it might increase the number of loops (almost unnecessary) so I\u0027m not sure that it would be better or not.","commit_id":"a08b4c51dea65ed63324aec330e375618036f80a"},{"author":{"_account_id":8542,"name":"Prashanth Pai","email":"ppai@redhat.com","username":"pai"},"change_message_id":"6c0533fb6f55c7a84ad0524d92e4df2ee393da12","unresolved":false,"context_lines":[{"line_number":498,"context_line":"        for node in nodes:"},{"line_number":499,"context_line":"            if node[\u0027id\u0027] \u003d\u003d node_id:"},{"line_number":500,"context_line":"                local_dev \u003d node"},{"line_number":501,"context_line":"                break"},{"line_number":502,"context_line":"        if shouldbehere:"},{"line_number":503,"context_line":"            shouldbehere \u003d bool([n for n in nodes if n[\u0027id\u0027] \u003d\u003d node_id])"},{"line_number":504,"context_line":"        # See Footnote [1] for an explanation of the repl_nodes assignment."}],"source_content_type":"text/x-python","patch_set":6,"id":"ba7be1f8_78fef46c","line":501,"in_reply_to":"da86d52c_50b90678","updated":"2015-03-02 07:35:51.000000000","message":"How about this ?\nIf we don\u0027t find local_dev in list returned by \"get_part_nodes\", we check for it\u0027s existence in list returned by \"get_more_nodes\"","commit_id":"a08b4c51dea65ed63324aec330e375618036f80a"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"7dfa6e2d3017a1e217b64fc62c1f3318b0c1ec0e","unresolved":false,"context_lines":[{"line_number":212,"context_line":"                          \u0027empty\u0027, \u0027diff_capped\u0027)]))"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"    def _rsync_file(self, db_file, remote_file, whole_file\u003dTrue,"},{"line_number":215,"context_line":"                    different_region\u003dFalse):"},{"line_number":216,"context_line":"        \"\"\""},{"line_number":217,"context_line":"        Sync a single file using rsync. Used by _rsync_db to handle syncing."},{"line_number":218,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a0c5dc1_abcb951d","line":215,"updated":"2015-05-13 21:48:43.000000000","message":"at this level this kwarg would be much better as just \"compress\u003dFalse\"","commit_id":"9c33bbde6923b26f111572ae967a3b97a8ab12f2"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"7dfa6e2d3017a1e217b64fc62c1f3318b0c1ec0e","unresolved":false,"context_lines":[{"line_number":257,"context_line":"        :param replicate_timeout: timeout to wait in seconds"},{"line_number":258,"context_line":"        :param different_region: if True, the destination node is in a"},{"line_number":259,"context_line":"                                 different region"},{"line_number":260,"context_line":"        \"\"\""},{"line_number":261,"context_line":"        device_ip \u003d rsync_ip(device[\u0027replication_ip\u0027])"},{"line_number":262,"context_line":"        if self.vm_test_mode:"},{"line_number":263,"context_line":"            remote_file \u003d \u0027%s::%s%s/%s/tmp/%s\u0027 % ("}],"source_content_type":"text/x-python","patch_set":7,"id":"9a0c5dc1_4b041949","line":260,"updated":"2015-05-13 21:48:43.000000000","message":"If we had an instance attribute that was keeping track of this node\u0027s region(s) I think could rip out all of the plumging from here on up and just check \"compress \u003d self.rsync_compress and device[\u0027region\u0027] not in self.regions\"","commit_id":"9c33bbde6923b26f111572ae967a3b97a8ab12f2"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"7dfa6e2d3017a1e217b64fc62c1f3318b0c1ec0e","unresolved":false,"context_lines":[{"line_number":509,"context_line":"        more_nodes \u003d self.ring.get_more_nodes(int(partition))"},{"line_number":510,"context_line":"        if not local_dev:"},{"line_number":511,"context_line":"            # Check further if local device is a handoff node"},{"line_number":512,"context_line":"            for node in more_nodes:"},{"line_number":513,"context_line":"                if node[\u0027id\u0027] \u003d\u003d node_id:"},{"line_number":514,"context_line":"                    local_dev \u003d node"},{"line_number":515,"context_line":"                    break"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a0c5dc1_4b56595d","line":512,"updated":"2015-05-13 21:48:43.000000000","message":"The plumbing here is nuts, we have a top-level loop over every device in the ring when we\u0027re looking for local devices - let\u0027s just collect which region(s) is local for this node once.","commit_id":"9c33bbde6923b26f111572ae967a3b97a8ab12f2"}]}
