)]}'
{"marconi/queues/storage/sharding.py":[{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"bfa03ee7b7ed7060c1a0b5a338a77615058c5b3f","unresolved":false,"context_lines":[{"line_number":369,"context_line":"        :type project: six.text_type"},{"line_number":370,"context_line":"        :raises: NoShardFound"},{"line_number":371,"context_line":"        \"\"\""},{"line_number":372,"context_line":"        if not self._catalogue_ctrl.exists(project, queue):"},{"line_number":373,"context_line":"            # NOTE(cpp-cabrera): limit\u003d0 implies unlimited - select from"},{"line_number":374,"context_line":"            # all shards"},{"line_number":375,"context_line":"            shard \u003d select.weighted(self._shards_ctrl.list(limit\u003d0))"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2Fa4g%3D","side":"PARENT","line":372,"updated":"2013-11-06 16:55:13.000000000","message":"This should still be in there. I\u0027ll fix this up.","commit_id":"c995a82839c7f148781845a09e83b2767dfa01ff"},{"author":{"_account_id":6943,"name":"Zhihao Yuan","email":"zhihao.yuan@rackspace.com","username":"zyuan"},"change_message_id":"9437e7af936364f28a774ce51cc46725c2d10527","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    # NOTE(kgriffs): Use string concatenation for performance,"},{"line_number":54,"context_line":"    # also put project first since it is guaranteed to be"},{"line_number":55,"context_line":"    # unique, which should reduce lookup time."},{"line_number":56,"context_line":"    return _SHARD_CACHE_PREFIX + str(project) + \u0027/\u0027 + queue"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"class DataDriver(storage.DataDriverBase):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2Fff4%3D","line":56,"updated":"2013-11-04 16:45:24.000000000","message":"str(None) -\u003e \u0027None\u0027","commit_id":"f2195525ff21627f44bfd0bf91645d1d136a1cec"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"5f54edb0f906c26b3143514d4174475c8a9730ed","unresolved":false,"context_lines":[{"line_number":46,"context_line":"# on the TTL."},{"line_number":47,"context_line":"#"},{"line_number":48,"context_line":"# TODO(kgriffs): Make configurable?"},{"line_number":49,"context_line":"_SHARD_CACHE_TTL \u003d 10"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"def _shard_cache_key(queue, project\u003dNone):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F9%2FOk%3D","line":49,"updated":"2013-12-03 18:30:19.000000000","message":"I\u0027m okay with this being made configurable in a future patch.","commit_id":"52e4201775423154fd68ec99f2e7f7819e11cf3d"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"9c198ad38730db762529344c15f29b8931bb97bd","unresolved":false,"context_lines":[{"line_number":46,"context_line":"# on the TTL."},{"line_number":47,"context_line":"#"},{"line_number":48,"context_line":"# TODO(kgriffs): Make configurable?"},{"line_number":49,"context_line":"_SHARD_CACHE_TTL \u003d 10"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"def _shard_cache_key(queue, project\u003dNone):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F94v4%3D","line":49,"in_reply_to":"AAAATn%2F9%2FOk%3D","updated":"2013-12-04 21:16:36.000000000","message":"I\u0027m not sure, though. This is the kind of value that I don\u0027t think users will ever be able to tune up correctly. For example: You may want to have a lower ttl if you\u0027ve a high number of migrations but keep it higher if you\u0027re distribution is pretty even and stable. I\u0027d rather have set it based on some heuristic based on the number of changes in the shards.","commit_id":"52e4201775423154fd68ec99f2e7f7819e11cf3d"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"9c198ad38730db762529344c15f29b8931bb97bd","unresolved":false,"context_lines":[{"line_number":399,"context_line":"            shard_id \u003d self._catalogue_ctrl.get(project, queue)[\u0027shard\u0027]"},{"line_number":400,"context_line":""},{"line_number":401,"context_line":"            if not self._cache.set(cache_key, shard_id, _SHARD_CACHE_TTL):"},{"line_number":402,"context_line":"                LOG.warn(\u0027Failed to cache shard ID\u0027)"},{"line_number":403,"context_line":""},{"line_number":404,"context_line":"        return shard_id"},{"line_number":405,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F94vs%3D","line":402,"updated":"2013-12-04 21:16:36.000000000","message":"+1 for the warn","commit_id":"52e4201775423154fd68ec99f2e7f7819e11cf3d"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"5f54edb0f906c26b3143514d4174475c8a9730ed","unresolved":false,"context_lines":[{"line_number":433,"context_line":"            shard \u003d select.weighted(self._shards_ctrl.list(limit\u003d0))"},{"line_number":434,"context_line":""},{"line_number":435,"context_line":"            if not shard:"},{"line_number":436,"context_line":"                raise errors.NoShardsFound()"},{"line_number":437,"context_line":""},{"line_number":438,"context_line":"            self._catalogue_ctrl.insert(project, queue, shard[\u0027name\u0027])"},{"line_number":439,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F9%2FNw%3D","line":436,"updated":"2013-12-03 18:30:19.000000000","message":"Thanks for this fix.","commit_id":"52e4201775423154fd68ec99f2e7f7819e11cf3d"}]}
