)]}'
{"etc/proxy-server.conf-sample":[{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"0c8f5e48a848adceadabe1b9945d16a2dd4e19e5","unresolved":false,"context_lines":[{"line_number":133,"context_line":"# How long the proxy should cache a set of shard ranges for a container."},{"line_number":134,"context_line":"# Note that stale shard range info should be fine; updates will still"},{"line_number":135,"context_line":"# eventually make their way to the correct shard."},{"line_number":136,"context_line":"# recheck_updating_shard_ranges \u003d 3600"},{"line_number":137,"context_line":"#"},{"line_number":138,"context_line":"# object_chunk_size \u003d 65536"},{"line_number":139,"context_line":"# client_chunk_size \u003d 65536"}],"source_content_type":"application/octet-stream","patch_set":3,"id":"7faddb67_0c36d753","line":136,"range":{"start_line":136,"start_character":34,"end_line":136,"end_character":38},"updated":"2019-07-10 16:49:00.000000000","message":"this is just a nit, but since this value is so much greater than the values for `recheck_container_existence` I think it would be a good idea to document the reasoning for that.","commit_id":"30fb94fb0a32a07ebd888b7f598e1e0fb04c0c8b"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"6b417b56892be34083016a011074208088ed6402","unresolved":false,"context_lines":[{"line_number":133,"context_line":"# How long the proxy should cache a set of shard ranges for a container."},{"line_number":134,"context_line":"# Note that stale shard range info should be fine; updates will still"},{"line_number":135,"context_line":"# eventually make their way to the correct shard."},{"line_number":136,"context_line":"# recheck_updating_shard_ranges \u003d 3600"},{"line_number":137,"context_line":"#"},{"line_number":138,"context_line":"# object_chunk_size \u003d 65536"},{"line_number":139,"context_line":"# client_chunk_size \u003d 65536"}],"source_content_type":"application/octet-stream","patch_set":3,"id":"7faddb67_56af67e2","line":136,"range":{"start_line":136,"start_character":34,"end_line":136,"end_character":38},"in_reply_to":"7faddb67_0c36d753","updated":"2019-07-11 17:41:34.000000000","message":"Done","commit_id":"30fb94fb0a32a07ebd888b7f598e1e0fb04c0c8b"}],"swift/proxy/controllers/base.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"9dffe9fce87e6f7777bf28b46da9af9a5e5b1732","unresolved":false,"context_lines":[{"line_number":2221,"context_line":"            if shard_ranges and memcache:"},{"line_number":2222,"context_line":"                # went to disk; cache it"},{"line_number":2223,"context_line":"                memcache.set(cache_key, [dict(sr) for sr in shard_ranges],"},{"line_number":2224,"context_line":"                             time\u003dself.app.recheck_updating_shard_ranges)"},{"line_number":2225,"context_line":""},{"line_number":2226,"context_line":"        if not shard_ranges:"},{"line_number":2227,"context_line":"            return None"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_abe671af","line":2224,"updated":"2019-06-24 20:36:17.000000000","message":"It\u0027ll be interesting to quantify the memcache value size limit (if any?)\n\nAlso I don\u0027t really know how much memcache space these little shard-range primitives take up - there might be a way to check memcache size before \u0026 after with 100, 1000, 10000 shard ranges","commit_id":"767b6758317ac1b88f40162e7f653b911fb7371b"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"99e4a0dd560dfff629587d291dcf94199ded05c2","unresolved":false,"context_lines":[{"line_number":2221,"context_line":"            if shard_ranges and memcache:"},{"line_number":2222,"context_line":"                # went to disk; cache it"},{"line_number":2223,"context_line":"                memcache.set(cache_key, [dict(sr) for sr in shard_ranges],"},{"line_number":2224,"context_line":"                             time\u003dself.app.recheck_updating_shard_ranges)"},{"line_number":2225,"context_line":""},{"line_number":2226,"context_line":"        if not shard_ranges:"},{"line_number":2227,"context_line":"            return None"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_863cc42f","line":2224,"in_reply_to":"9fb8cfa7_abe671af","updated":"2019-06-24 21:23:07.000000000","message":"Apparently there\u0027s a default limit of 1MiB, but more recent versions make that configurable -- see https://github.com/memcached/memcached/wiki/ReleaseNotes142#configurable-maximum-item-size. I started playing around with dropping the limit to 1k:\n\n cat /etc/memcached.conf | sed -e \u0027/^#/d;/^$/d\u0027\n -d\n logfile /var/log/memcached.log\n -m 64\n -p 11211\n -u memcache\n -l 127.0.0.1\n -I 1024\n -o slab_chunk_max\u003d1024\n -P /var/run/memcached/memcached.pid\n\n(Note that you may need to drop slab_chunk_max, too.) Then I spun up a MemcacheRing and seeing what happens:\n\n \u003e\u003e\u003e from swift.common.memcached import *\n \u003e\u003e\u003e c\u003dMemcacheRing([\u0027127.0.0.1:11211\u0027])\n \u003e\u003e\u003e c.get(\u0027container/AUTH_test/cont\u0027)\n \u003e\u003e\u003e c.set(\u0027container/AUTH_test/cont\u0027, \u0027asdf\u0027)\n \u003e\u003e\u003e c.get(\u0027container/AUTH_test/cont\u0027)\n u\u0027asdf\u0027\n \u003e\u003e\u003e c.set(\u0027container/AUTH_test/cont\u0027, \u0027asdf\u0027*1000)\n \u003e\u003e\u003e c.get(\u0027container/AUTH_test/cont\u0027)\n \u003e\u003e\u003e \n\nSo, I guess attempting a set() that exceeds the limit behaves like a delete()? Not entirely crazy behavior...\n\nFWIW, I had some test container where I started uploading some of Swift\u0027s source and I broke it up into 27 shards; the value written to memcache was ~10KiB. In general it\u0027s going to depend on the length of you object names, though.","commit_id":"767b6758317ac1b88f40162e7f653b911fb7371b"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"42b5dff2cd24fafb63f1c5e89ddce3cbb3fd9127","unresolved":false,"context_lines":[{"line_number":2206,"context_line":"            return shard_ranges[0]"},{"line_number":2207,"context_line":""},{"line_number":2208,"context_line":"        cache_key \u003d get_cache_key(account, container, shard\u003d\u0027updating\u0027)"},{"line_number":2209,"context_line":"        memcache \u003d getattr(self.app, \u0027memcache\u0027, None) or env.get("},{"line_number":2210,"context_line":"            \u0027swift.cache\u0027)"},{"line_number":2211,"context_line":"        shard_ranges \u003d None"},{"line_number":2212,"context_line":"        if memcache:"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fb8cfa7_cb7e2e18","line":2209,"range":{"start_line":2209,"start_character":58,"end_line":2209,"end_character":61},"updated":"2019-06-25 23:17:39.000000000","message":"gdi","commit_id":"844b6fa06e1f8724a02b292af23cd176790667e4"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"0c8f5e48a848adceadabe1b9945d16a2dd4e19e5","unresolved":false,"context_lines":[{"line_number":2196,"context_line":"                req.path_qs, err)"},{"line_number":2197,"context_line":"            return None"},{"line_number":2198,"context_line":""},{"line_number":2199,"context_line":"    def _get_update_shard(self, req, account, container, includes):"},{"line_number":2200,"context_line":"        if not self.app.recheck_updating_shard_ranges:"},{"line_number":2201,"context_line":"            # caching is disabled; fall back to old behavior"},{"line_number":2202,"context_line":"            shard_ranges \u003d self._get_shard_ranges("}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_ec233b04","line":2199,"updated":"2019-07-10 16:49:00.000000000","message":"just nit, but please add some docstrings","commit_id":"30fb94fb0a32a07ebd888b7f598e1e0fb04c0c8b"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"6b417b56892be34083016a011074208088ed6402","unresolved":false,"context_lines":[{"line_number":2196,"context_line":"                req.path_qs, err)"},{"line_number":2197,"context_line":"            return None"},{"line_number":2198,"context_line":""},{"line_number":2199,"context_line":"    def _get_update_shard(self, req, account, container, includes):"},{"line_number":2200,"context_line":"        if not self.app.recheck_updating_shard_ranges:"},{"line_number":2201,"context_line":"            # caching is disabled; fall back to old behavior"},{"line_number":2202,"context_line":"            shard_ranges \u003d self._get_shard_ranges("}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_76aaa3d2","line":2199,"in_reply_to":"7faddb67_ec233b04","updated":"2019-07-11 17:41:34.000000000","message":"Done","commit_id":"30fb94fb0a32a07ebd888b7f598e1e0fb04c0c8b"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"0c8f5e48a848adceadabe1b9945d16a2dd4e19e5","unresolved":false,"context_lines":[{"line_number":2206,"context_line":"            return shard_ranges[0]"},{"line_number":2207,"context_line":""},{"line_number":2208,"context_line":"        cache_key \u003d get_cache_key(account, container, shard\u003d\u0027updating\u0027)"},{"line_number":2209,"context_line":"        memcache \u003d getattr(self.app, \u0027memcache\u0027, None) or req.environ.get("},{"line_number":2210,"context_line":"            \u0027swift.cache\u0027)"},{"line_number":2211,"context_line":"        shard_ranges \u003d None"},{"line_number":2212,"context_line":"        if memcache:"}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_0c0fb789","line":2209,"updated":"2019-07-10 16:49:00.000000000","message":"we are not checking env.infocache here as we do for account and container, would it make sense to?","commit_id":"30fb94fb0a32a07ebd888b7f598e1e0fb04c0c8b"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"6b417b56892be34083016a011074208088ed6402","unresolved":false,"context_lines":[{"line_number":2206,"context_line":"            return shard_ranges[0]"},{"line_number":2207,"context_line":""},{"line_number":2208,"context_line":"        cache_key \u003d get_cache_key(account, container, shard\u003d\u0027updating\u0027)"},{"line_number":2209,"context_line":"        memcache \u003d getattr(self.app, \u0027memcache\u0027, None) or req.environ.get("},{"line_number":2210,"context_line":"            \u0027swift.cache\u0027)"},{"line_number":2211,"context_line":"        shard_ranges \u003d None"},{"line_number":2212,"context_line":"        if memcache:"}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_16b9ef2c","line":2209,"in_reply_to":"7faddb67_0c0fb789","updated":"2019-07-11 17:41:34.000000000","message":"Done","commit_id":"30fb94fb0a32a07ebd888b7f598e1e0fb04c0c8b"}]}
