)]}'
{"marconi/common/decorators.py":[{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"c646f98017c279e7fe9fb1a75af4264dd081527c","unresolved":false,"context_lines":[{"line_number":50,"context_line":"    \"\"\"Flags a getter method as being cached using oslo.cache."},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    It is assumed that the containing class defines an attribute"},{"line_number":53,"context_line":"    named `_cache` that is an instance of an oslo.cache backend."},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    The getter should raise an exception if the value can\u0027t be"},{"line_number":56,"context_line":"    loaded, which will skip the caching step. Otherwise, the"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_4b477a1d","line":53,"updated":"2014-06-05 12:29:56.000000000","message":"mmh, I personally don\u0027t like this assumption but since we\u0027re going to use this internally, it\u0027s probably ok.","commit_id":"2ccdd8f3eb3d1a0c328cfd441e840f2b32e690f1"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"8d2626501b92f101b90b1d163fa83322e641e256","unresolved":false,"context_lines":[{"line_number":50,"context_line":"    \"\"\"Flags a getter method as being cached using oslo.cache."},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    It is assumed that the containing class defines an attribute"},{"line_number":53,"context_line":"    named `_cache` that is an instance of an oslo.cache backend."},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    The getter should raise an exception if the value can\u0027t be"},{"line_number":56,"context_line":"    loaded, which will skip the caching step. Otherwise, the"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_14a8d3d9","line":53,"in_reply_to":"1ae5cdf2_4b477a1d","updated":"2014-06-06 23:37:37.000000000","message":"TBH, I\u0027m not 100% satisfied either, but I couldn\u0027t find a better way to implement caching as a property without using a global variable.","commit_id":"2ccdd8f3eb3d1a0c328cfd441e840f2b32e690f1"},{"author":{"_account_id":10777,"name":"Nataliia Uvarova","email":"grafinya.uvarova@gmail.com","username":"AAzza"},"change_message_id":"2d675e7619c1a802287f6be283dbd1f3d59a9b4d","unresolved":false,"context_lines":[{"line_number":114,"context_line":"                    if not self._cache.set(key, packed_value, ttl):"},{"line_number":115,"context_line":"                        LOG.warn(\u0027Failed to cache key: \u0027 + key)"},{"line_number":116,"context_line":"            else:"},{"line_number":117,"context_line":"                value \u003d msgpack.unpackb(packed_value)"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"            return value"},{"line_number":120,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_1e38f23b","line":117,"updated":"2014-06-05 14:30:26.000000000","message":"msgpack.unpackb returns `str` on py2 and `bytes` on py3. Although it is not a problem, for py2 (as I suppose it will not be used to cache unicode strings), for py3 it is a problem. You can see tests failing on the py3 smth like \u0027string\u0027 !\u003d b\u0027string\u0027. \nOne of the options could be to specify encoding parameter to unpackb, but (doh) yes, it is ugly.\n\nThis comment is not preventing from merge, just want for you to be awere, that probably I should fix this later.","commit_id":"2ccdd8f3eb3d1a0c328cfd441e840f2b32e690f1"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"8d2626501b92f101b90b1d163fa83322e641e256","unresolved":false,"context_lines":[{"line_number":114,"context_line":"                    if not self._cache.set(key, packed_value, ttl):"},{"line_number":115,"context_line":"                        LOG.warn(\u0027Failed to cache key: \u0027 + key)"},{"line_number":116,"context_line":"            else:"},{"line_number":117,"context_line":"                value \u003d msgpack.unpackb(packed_value)"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"            return value"},{"line_number":120,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_a924f4af","line":117,"in_reply_to":"1ae5cdf2_1e38f23b","updated":"2014-06-06 23:37:37.000000000","message":"Good catch. I played around with msgpack and found that you can pass an encoding parameter that will ensure strings are unpacked as unicode. \n\nHowever, I found the python library by default doesn\u0027t output the two string types (binary and unicode) as different MessagePack types, so when reading them back in, they both end up as unicode, which obviously won\u0027t work if what you are putting in is actually a sequence of bytes, not text.\n\nThe trick is to specify use_bin_type\u003dTrue in packb so that type fidelity is preserved. I\u0027ll update the decorator (and tests!) to deal with this and submit a new version of the patch.","commit_id":"2ccdd8f3eb3d1a0c328cfd441e840f2b32e690f1"}],"marconi/queues/storage/mongodb/queues.py":[{"author":{"_account_id":11193,"name":"Obulpathi","email":"obulapathi.challa@rackspace.com","username":"obulpathi"},"change_message_id":"cde6088c87095f05f9365f296a0e2a12df981342","unresolved":false,"context_lines":[{"line_number":46,"context_line":"# deleted a queue and then immediately tried to post messages"},{"line_number":47,"context_line":"# to it. If they keep trying to use the queue, they will"},{"line_number":48,"context_line":"# eventually start getting an error, once the cache entry"},{"line_number":49,"context_line":"# expires, which should clue them in on what happened."},{"line_number":50,"context_line":"#"},{"line_number":51,"context_line":"# TODO(kgriffs): Make dynamic?"},{"line_number":52,"context_line":"_QUEUE_CACHE_TTL \u003d 5"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_cf6ef22e","line":49,"updated":"2014-06-04 21:22:15.000000000","message":"Wondering if this caching feature and Lazy Queue Create work well together. If the user deletes queue form one client and another client\u0027s producer posts a message to it, then won\u0027t Lazy Queue Create recreate that Queue? Or am I off the track on Lazy Queue Create?","commit_id":"2ccdd8f3eb3d1a0c328cfd441e840f2b32e690f1"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"8d2626501b92f101b90b1d163fa83322e641e256","unresolved":false,"context_lines":[{"line_number":46,"context_line":"# deleted a queue and then immediately tried to post messages"},{"line_number":47,"context_line":"# to it. If they keep trying to use the queue, they will"},{"line_number":48,"context_line":"# eventually start getting an error, once the cache entry"},{"line_number":49,"context_line":"# expires, which should clue them in on what happened."},{"line_number":50,"context_line":"#"},{"line_number":51,"context_line":"# TODO(kgriffs): Make dynamic?"},{"line_number":52,"context_line":"_QUEUE_CACHE_TTL \u003d 5"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_09f088c8","line":49,"in_reply_to":"1ae5cdf2_09fb6379","updated":"2014-06-06 23:37:37.000000000","message":"With lazy queues, I think you have to think of the queue as always existing. We could even remove the create/delete queue operations and just say you can set metadata (associate) or delete metadata (disassociate) with a given \"topic\". But the queue AKA topic itself isn\u0027t really a concrete thing.\n\nTL;DR caching the \"exists\" lookup is important to keep for the 1.0 API, but not needed for newer versions of the API that will treat a queue more like a topic.","commit_id":"2ccdd8f3eb3d1a0c328cfd441e840f2b32e690f1"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"c646f98017c279e7fe9fb1a75af4264dd081527c","unresolved":false,"context_lines":[{"line_number":46,"context_line":"# deleted a queue and then immediately tried to post messages"},{"line_number":47,"context_line":"# to it. If they keep trying to use the queue, they will"},{"line_number":48,"context_line":"# eventually start getting an error, once the cache entry"},{"line_number":49,"context_line":"# expires, which should clue them in on what happened."},{"line_number":50,"context_line":"#"},{"line_number":51,"context_line":"# TODO(kgriffs): Make dynamic?"},{"line_number":52,"context_line":"_QUEUE_CACHE_TTL \u003d 5"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_09fb6379","line":49,"in_reply_to":"1ae5cdf2_cf6ef22e","updated":"2014-06-05 12:29:56.000000000","message":"I\u0027ve been thinking a bit about this and I wonder whether we really need this caching since we\u0027re moving to lazy queues. In which cases will it be useful? \n\nFor queues creation we should use the \"Forgiveness\" approach instead of asking whether it exists. Does this make sense? I\u0027m probably forgetting something.","commit_id":"2ccdd8f3eb3d1a0c328cfd441e840f2b32e690f1"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"964b7b2fb1d48e8d18c45a807e3e6576f98fc105","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"# NOTE(kgriffs): E.g.: \u0027marconi-queuecontroller:5083853/my-queue\u0027"},{"line_number":37,"context_line":"_QUEUE_CACHE_PREFIX \u003d \u0027queuecontroller:\u0027"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"# NOTE(kgriffs): This causes some race conditions, but they are"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_e71cc9c4","line":36,"updated":"2014-06-12 06:21:53.000000000","message":"(nit): How about keep the sample be consistent with line 59?","commit_id":"4c93505f8cf80888ad75b2d6df749e3537c83751"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"be8c5fd2f23164a75d6ae7c86bfdc8da33dacca1","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"# NOTE(kgriffs): E.g.: \u0027marconi-queuecontroller:5083853/my-queue\u0027"},{"line_number":37,"context_line":"_QUEUE_CACHE_PREFIX \u003d \u0027queuecontroller:\u0027"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"# NOTE(kgriffs): This causes some race conditions, but they are"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_e3caef4d","line":36,"in_reply_to":"1ae5cdf2_e71cc9c4","updated":"2014-06-12 14:51:03.000000000","message":"Good point. I will update in another small patch.","commit_id":"4c93505f8cf80888ad75b2d6df749e3537c83751"}],"marconi/queues/storage/sharding.py":[{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"964b7b2fb1d48e8d18c45a807e3e6576f98fc105","unresolved":false,"context_lines":[{"line_number":41,"context_line":"# before \"unfreezing\" the queue, rather than waiting"},{"line_number":42,"context_line":"# on the TTL."},{"line_number":43,"context_line":"#"},{"line_number":44,"context_line":"# TODO(kgriffs): Make dynamic?"},{"line_number":45,"context_line":"_SHARD_CACHE_TTL \u003d 10"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_c7f6edd6","line":44,"updated":"2014-06-12 06:21:53.000000000","message":"What\u0027s the difference between \"configurable\" and \"dynamic\"?","commit_id":"4c93505f8cf80888ad75b2d6df749e3537c83751"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"be8c5fd2f23164a75d6ae7c86bfdc8da33dacca1","unresolved":false,"context_lines":[{"line_number":41,"context_line":"# before \"unfreezing\" the queue, rather than waiting"},{"line_number":42,"context_line":"# on the TTL."},{"line_number":43,"context_line":"#"},{"line_number":44,"context_line":"# TODO(kgriffs): Make dynamic?"},{"line_number":45,"context_line":"_SHARD_CACHE_TTL \u003d 10"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_23ef77b2","line":44,"in_reply_to":"1ae5cdf2_c7f6edd6","updated":"2014-06-12 14:51:03.000000000","message":"I think I meant configurable here. I will change the comment in a followup patch.","commit_id":"4c93505f8cf80888ad75b2d6df749e3537c83751"}],"tests/unit/common/test_decorators.py":[{"author":{"_account_id":8092,"name":"Sriram Madapusi Vasudevan","email":"sriram1991mv@gmail.com","username":"thesriram"},"change_message_id":"5cdbcd8145d0120f90cccf7c9231a50a49ffc407","unresolved":false,"context_lines":[{"line_number":99,"context_line":"                self._cache \u003d cache"},{"line_number":100,"context_line":"                self.user_gets \u003d 0"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"            @decorators.caches(lambda x: x, 60, lambda v: v !\u003d \u0027kgriffs\u0027)"},{"line_number":103,"context_line":"            def get_user(self, name):"},{"line_number":104,"context_line":"                self.user_gets +\u003d 1"},{"line_number":105,"context_line":"                return name"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_3bc24134","line":102,"updated":"2014-06-04 16:27:19.000000000","message":"so these are ttls and cond right? Am i missing the keygen here?","commit_id":"2ccdd8f3eb3d1a0c328cfd441e840f2b32e690f1"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"8d2626501b92f101b90b1d163fa83322e641e256","unresolved":false,"context_lines":[{"line_number":99,"context_line":"                self._cache \u003d cache"},{"line_number":100,"context_line":"                self.user_gets \u003d 0"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"            @decorators.caches(lambda x: x, 60, lambda v: v !\u003d \u0027kgriffs\u0027)"},{"line_number":103,"context_line":"            def get_user(self, name):"},{"line_number":104,"context_line":"                self.user_gets +\u003d 1"},{"line_number":105,"context_line":"                return name"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_099ec863","line":102,"in_reply_to":"1ae5cdf2_3bc24134","updated":"2014-06-06 23:37:37.000000000","message":"keygen \u003d lambda x: x\nttl \u003d 60\nshould_cache \u003d lambda v: v !\u003d \u0027kgriffs\u0027","commit_id":"2ccdd8f3eb3d1a0c328cfd441e840f2b32e690f1"}]}
