)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"1be54815aaa21b8cbcd31ba781e1cb0160ed7f44","unresolved":false,"context_lines":[{"line_number":16,"context_line":"portion of this is still to be done, and is reserved for a future"},{"line_number":17,"context_line":"patch."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Faulty and Pipeline storage drivers have been given the appropriate"},{"line_number":20,"context_line":"catalogue_controller impls."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Furthermore, minor py3k updates were added: metaclass using"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"AAAATn%2F%2FwWo%3D","line":19,"updated":"2013-10-29 14:29:30.000000000","message":"The pipeline storage driver should not have a catalogue_controller property","commit_id":"86d8f9e50f0ce00b10da97e860373474fcb3700d"}],"marconi/queues/storage/__init__.py":[{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"b4b0e45a1a126971302a78fd933ff68deaf0818e","unresolved":false,"context_lines":[{"line_number":9,"context_line":"CatalogueBase \u003d base.CatalogueBase"},{"line_number":10,"context_line":"ClaimBase \u003d base.ClaimBase"},{"line_number":11,"context_line":"MessageBase \u003d base.MessageBase"},{"line_number":12,"context_line":"QueueBase \u003d base.QueueBase"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2Fzxw%3D","line":12,"updated":"2013-10-28 18:46:08.000000000","message":"You might notice that ShardsBase is missing here. It\u0027s added in here: https://review.openstack.org/#/c/50815/ (and also renamed: ShardsController -\u003e ShardsBase)","commit_id":"ca1c0b5a9c068dec60ea08ad2a4696e4b316a7f4"}],"marconi/queues/storage/base.py":[{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"344edcd15f7969ce54d2c89aa81f5227b4bfa7cb","unresolved":false,"context_lines":[{"line_number":70,"context_line":"    @abc.abstractproperty"},{"line_number":71,"context_line":"    def catalogue_controller(self):"},{"line_number":72,"context_line":"        \"\"\"Returns the driver\u0027s catalogue controller.\"\"\""},{"line_number":73,"context_line":"        raise NotImplementedError"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"class ControllerBase(object):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATX%2F%2F%2BBg%3D","line":73,"updated":"2013-10-23 14:34:09.000000000","message":"This driver was written before the notion of admin storage was introduced. When one or the other is merged, I\u0027ll make a patch set that moves the catalogue storage driver to the admin side of storage.","commit_id":"84932933aba292b07aae06033e83a65f034da0bd"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"34d07226897bb100db33af8448d50512082085ec","unresolved":false,"context_lines":[{"line_number":363,"context_line":"        :param project: The project to use when filtering through queue"},{"line_number":364,"context_line":"                        entries."},{"line_number":365,"context_line":"        :type project: six.text_type"},{"line_number":366,"context_line":"        :returns: [{\u0027project\u0027: ..., \u0027queue\u0027: ..., \u0027shard\u0027: ...},]"},{"line_number":367,"context_line":"        :rtype: [dict]"},{"line_number":368,"context_line":"        \"\"\""},{"line_number":369,"context_line":"        raise NotImplementedError"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATX%2F%2F8d0%3D","line":366,"updated":"2013-10-23 21:52:40.000000000","message":"Is \u0027project\u0027 needed, given that the caller already knows it?","commit_id":"4c8ace0ba47468a9c0c2f0d2477f8a3e65ff2c5e"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"2f1a36b6b6908c8b57a5cb3af804028c8f5e727b","unresolved":false,"context_lines":[{"line_number":363,"context_line":"        :param project: The project to use when filtering through queue"},{"line_number":364,"context_line":"                        entries."},{"line_number":365,"context_line":"        :type project: six.text_type"},{"line_number":366,"context_line":"        :returns: [{\u0027project\u0027: ..., \u0027queue\u0027: ..., \u0027shard\u0027: ...},]"},{"line_number":367,"context_line":"        :rtype: [dict]"},{"line_number":368,"context_line":"        \"\"\""},{"line_number":369,"context_line":"        raise NotImplementedError"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2F%2BF0%3D","line":366,"in_reply_to":"AAAATX%2F%2F8d0%3D","updated":"2013-10-24 13:48:39.000000000","message":"\u0027project\u0027 is necessary, since it is the filtering condition through the catalogue. If one wants to list from the global name space, then it is necessary to pass in \u0027project\u003dNone\u0027.","commit_id":"4c8ace0ba47468a9c0c2f0d2477f8a3e65ff2c5e"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"34d07226897bb100db33af8448d50512082085ec","unresolved":false,"context_lines":[{"line_number":377,"context_line":"        :type project: six.text_type"},{"line_number":378,"context_line":"        :param queue: The name of the queue to search for"},{"line_number":379,"context_line":"        :type queue: six.text_type"},{"line_number":380,"context_line":"        :returns: {\u0027shard\u0027: ...}"},{"line_number":381,"context_line":"        :rtype: dict"},{"line_number":382,"context_line":"        :raises: EntryNotFound"},{"line_number":383,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATX%2F%2F8c4%3D","line":380,"updated":"2013-10-23 21:52:40.000000000","message":"What is the advantage of enclosing in a dict, rather than just returning the value for \u0027shard\u0027 directly?","commit_id":"4c8ace0ba47468a9c0c2f0d2477f8a3e65ff2c5e"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"2f1a36b6b6908c8b57a5cb3af804028c8f5e727b","unresolved":false,"context_lines":[{"line_number":377,"context_line":"        :type project: six.text_type"},{"line_number":378,"context_line":"        :param queue: The name of the queue to search for"},{"line_number":379,"context_line":"        :type queue: six.text_type"},{"line_number":380,"context_line":"        :returns: {\u0027shard\u0027: ...}"},{"line_number":381,"context_line":"        :rtype: dict"},{"line_number":382,"context_line":"        :raises: EntryNotFound"},{"line_number":383,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2F%2BE0%3D","line":380,"in_reply_to":"AAAATX%2F%2F8c4%3D","updated":"2013-10-24 13:48:39.000000000","message":"Hmm, it seems the documentation is lacking here. It\u0027s structure is more like:\n\n    {\n      \u0027shard\u0027: \u0027name\u0027,\n      \u0027pq\u0027: \u0027project+queue\u0027\n    }\n\nThat\u0027s why it is wrapped in a dict. Alternatively, since this is a key-value lookup, I could restructure the schema so that get(project, queue) \u003d\u003e shard, and list(project) -\u003e {\u0027shards\u0027: [shards]}.\n\nThoughts?","commit_id":"4c8ace0ba47468a9c0c2f0d2477f8a3e65ff2c5e"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"34d07226897bb100db33af8448d50512082085ec","unresolved":false,"context_lines":[{"line_number":427,"context_line":"        :type project: six.text_type"},{"line_number":428,"context_line":"        :param queue: The name of the queue"},{"line_number":429,"context_line":"        :type queue: six.text_type"},{"line_number":430,"context_line":"        :param kwargs: {\u0027shard\u0027: ...}"},{"line_number":431,"context_line":"        :type kwargs: dict"},{"line_number":432,"context_line":"        :raises: EntryNotFound"},{"line_number":433,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATX%2F%2F8cE%3D","line":430,"updated":"2013-10-23 21:52:40.000000000","message":"Why did you choose to use **kwargs as opposed to defining the shard param explicitly?","commit_id":"4c8ace0ba47468a9c0c2f0d2477f8a3e65ff2c5e"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"2f1a36b6b6908c8b57a5cb3af804028c8f5e727b","unresolved":false,"context_lines":[{"line_number":427,"context_line":"        :type project: six.text_type"},{"line_number":428,"context_line":"        :param queue: The name of the queue"},{"line_number":429,"context_line":"        :type queue: six.text_type"},{"line_number":430,"context_line":"        :param kwargs: {\u0027shard\u0027: ...}"},{"line_number":431,"context_line":"        :type kwargs: dict"},{"line_number":432,"context_line":"        :raises: EntryNotFound"},{"line_number":433,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2F%2BEs%3D","line":430,"in_reply_to":"AAAATX%2F%2F8cE%3D","updated":"2013-10-24 13:48:39.000000000","message":"To allow for updates to multiple fields in one shot, or rather, to keep that possibility open for the future.","commit_id":"4c8ace0ba47468a9c0c2f0d2477f8a3e65ff2c5e"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"1be54815aaa21b8cbcd31ba781e1cb0160ed7f44","unresolved":false,"context_lines":[{"line_number":486,"context_line":""},{"line_number":487,"context_line":"        :param project: Namespace to search for the given queue"},{"line_number":488,"context_line":"        :type project: six.text_type"},{"line_number":489,"context_line":"        :param queue: The name of the queue to search for"},{"line_number":490,"context_line":"        :type queue: six.text_type"},{"line_number":491,"context_line":"        :returns: {\u0027shard\u0027: ...}"},{"line_number":492,"context_line":"        :rtype: dict"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F%2Fwdw%3D","line":489,"updated":"2013-10-29 14:29:30.000000000","message":":type queue:\n\nAlso applies to the other docstrings below.","commit_id":"86d8f9e50f0ce00b10da97e860373474fcb3700d"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"43c76bb0364ffa8af63445bfd932b70e663983f2","unresolved":false,"context_lines":[{"line_number":486,"context_line":""},{"line_number":487,"context_line":"        :param project: Namespace to search for the given queue"},{"line_number":488,"context_line":"        :type project: six.text_type"},{"line_number":489,"context_line":"        :param queue: The name of the queue to search for"},{"line_number":490,"context_line":"        :type queue: six.text_type"},{"line_number":491,"context_line":"        :returns: {\u0027shard\u0027: ...}"},{"line_number":492,"context_line":"        :rtype: dict"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F%2FwRo%3D","line":489,"in_reply_to":"AAAATn%2F%2Fwdw%3D","updated":"2013-10-29 15:02:57.000000000","message":"Turns out that it was applied to all of them *except* for `exists`. :P\n\nDone.","commit_id":"86d8f9e50f0ce00b10da97e860373474fcb3700d"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"43c76bb0364ffa8af63445bfd932b70e663983f2","unresolved":false,"context_lines":[{"line_number":501,"context_line":"        :param project: Namespace to check."},{"line_number":502,"context_line":"        :type project: six.text_type"},{"line_number":503,"context_line":"        :param queue: str - Particular queue to check for"},{"line_number":504,"context_line":"        :type project: six.text_type"},{"line_number":505,"context_line":"        :return: True if the queue exists under this project"},{"line_number":506,"context_line":"        :rtype: bool"},{"line_number":507,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F%2FwRw%3D","line":504,"updated":"2013-10-29 15:02:57.000000000","message":"Accidentally duplicated here, heh.","commit_id":"86d8f9e50f0ce00b10da97e860373474fcb3700d"}],"marconi/queues/storage/exceptions.py":[{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"34d07226897bb100db33af8448d50512082085ec","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        super(ClaimDoesNotExist, self).__init__(msg)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"class EntryDoesNotExist(DoesNotExist):"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def __init__(self, queue, project):"},{"line_number":106,"context_line":"        msg \u003d (u\u0027No shard found for \u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATX%2F%2F8bc%3D","line":103,"updated":"2013-10-23 21:52:40.000000000","message":"\"Entry\" seems a little too generic. How about \"ShardDoesNotExist\" or something similar?","commit_id":"4c8ace0ba47468a9c0c2f0d2477f8a3e65ff2c5e"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"2f1a36b6b6908c8b57a5cb3af804028c8f5e727b","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        super(ClaimDoesNotExist, self).__init__(msg)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"class EntryDoesNotExist(DoesNotExist):"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def __init__(self, queue, project):"},{"line_number":106,"context_line":"        msg \u003d (u\u0027No shard found for \u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2F%2BEg%3D","line":103,"in_reply_to":"AAAATX%2F%2F8bc%3D","updated":"2013-10-24 13:48:39.000000000","message":"It\u0027s a little bit of name trickiness. Here we have a catalogue mapping (project, queue) \u003d\u003e shard. On the other hand, we have the ShardsController that maps (shard) \u003d\u003e shard_configuration (uri, options).\n\nIf a lookup fails in the (project, queue) \u003d\u003e shard structure, what kind of failure is that relative to a lookup failing in the (shard) \u003d\u003e shard_config structure?\n\nI\u0027ve been using EntryDoesNotExist for the (project, queue) \u003d\u003e shard case and ShardDoesNotExist for the (shard) \u003d\u003e shard_config case.","commit_id":"4c8ace0ba47468a9c0c2f0d2477f8a3e65ff2c5e"}],"marconi/queues/storage/mongodb/catalogue.py":[{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"34d07226897bb100db33af8448d50512082085ec","unresolved":false,"context_lines":[{"line_number":18,"context_line":"Serves to construct an association between a project + queue -\u003e shard"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"{"},{"line_number":21,"context_line":"    \u0027pq\u0027: project_queue :: six.text_type,"},{"line_number":22,"context_line":"    \u0027s\u0027: shard_identifier :: six.text_type"},{"line_number":23,"context_line":"}"},{"line_number":24,"context_line":"\"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATX%2F%2F8aw%3D","line":21,"updated":"2013-10-23 21:52:40.000000000","message":"Other controllers use \u0027p_q\u0027. Not a big deal right now, but we should decide which way to go and just make everything consistent.","commit_id":"4c8ace0ba47468a9c0c2f0d2477f8a3e65ff2c5e"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"2f1a36b6b6908c8b57a5cb3af804028c8f5e727b","unresolved":false,"context_lines":[{"line_number":18,"context_line":"Serves to construct an association between a project + queue -\u003e shard"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"{"},{"line_number":21,"context_line":"    \u0027pq\u0027: project_queue :: six.text_type,"},{"line_number":22,"context_line":"    \u0027s\u0027: shard_identifier :: six.text_type"},{"line_number":23,"context_line":"}"},{"line_number":24,"context_line":"\"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2F%2BAU%3D","line":21,"in_reply_to":"AAAATX%2F%2F8aw%3D","updated":"2013-10-24 13:48:39.000000000","message":"Good point. Thanks for noting this. I can fix this up in this patch since it depends on nothing else. :)","commit_id":"4c8ace0ba47468a9c0c2f0d2477f8a3e65ff2c5e"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"34d07226897bb100db33af8448d50512082085ec","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        super(CatalogueController, self).__init__(*args, **kwargs)"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"        self._col \u003d self.driver.catalogue_database.catalogue"},{"line_number":46,"context_line":"        self._col.ensure_index(CATALOGUE_INDEX, unique\u003dTrue)"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    @utils.raises_conn_error"},{"line_number":49,"context_line":"    def list(self, project):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATX%2F%2F8ZE%3D","line":46,"updated":"2013-10-23 21:52:40.000000000","message":"Nice catch setting unique\u003dTrue here. In fact, you could just get rid of the the extra \u0027pq\u0027 field and use it for _id directly. However, that may prove tricky later if we actually want the object ID for extracting timestamp or something. :p","commit_id":"4c8ace0ba47468a9c0c2f0d2477f8a3e65ff2c5e"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"2f1a36b6b6908c8b57a5cb3af804028c8f5e727b","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        super(CatalogueController, self).__init__(*args, **kwargs)"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"        self._col \u003d self.driver.catalogue_database.catalogue"},{"line_number":46,"context_line":"        self._col.ensure_index(CATALOGUE_INDEX, unique\u003dTrue)"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    @utils.raises_conn_error"},{"line_number":49,"context_line":"    def list(self, project):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2F%2BAQ%3D","line":46,"in_reply_to":"AAAATX%2F%2F8ZE%3D","updated":"2013-10-24 13:48:39.000000000","message":"I feel more comfortable leaving the generation of \u0027_id\u0027 to mongo. As you said, we lose flexibility if we decide on setting \u0027_id\u0027 ourselves now. :)","commit_id":"4c8ace0ba47468a9c0c2f0d2477f8a3e65ff2c5e"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"34d07226897bb100db33af8448d50512082085ec","unresolved":false,"context_lines":[{"line_number":51,"context_line":""},{"line_number":52,"context_line":"        query \u003d utils.scoped_query(None, project, \u0027pq\u0027)"},{"line_number":53,"context_line":"        cursor \u003d self._col.find(query, fields)"},{"line_number":54,"context_line":"        for entry in cursor:"},{"line_number":55,"context_line":"            yield _normalize(entry)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    @utils.raises_conn_error"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATX%2F%2F8aI%3D","line":54,"updated":"2013-10-23 21:52:40.000000000","message":"Maybe use utils.HookedCursor here?","commit_id":"4c8ace0ba47468a9c0c2f0d2477f8a3e65ff2c5e"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"2f1a36b6b6908c8b57a5cb3af804028c8f5e727b","unresolved":false,"context_lines":[{"line_number":51,"context_line":""},{"line_number":52,"context_line":"        query \u003d utils.scoped_query(None, project, \u0027pq\u0027)"},{"line_number":53,"context_line":"        cursor \u003d self._col.find(query, fields)"},{"line_number":54,"context_line":"        for entry in cursor:"},{"line_number":55,"context_line":"            yield _normalize(entry)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    @utils.raises_conn_error"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2F9%2F4%3D","line":54,"in_reply_to":"AAAATX%2F%2F8aI%3D","updated":"2013-10-24 13:48:39.000000000","message":"I\u0027ll look into that, thanks!","commit_id":"4c8ace0ba47468a9c0c2f0d2477f8a3e65ff2c5e"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"34d07226897bb100db33af8448d50512082085ec","unresolved":false,"context_lines":[{"line_number":57,"context_line":"    @utils.raises_conn_error"},{"line_number":58,"context_line":"    def get(self, project, queue):"},{"line_number":59,"context_line":"        fields \u003d {\u0027_id\u0027: 0}"},{"line_number":60,"context_line":"        key \u003d utils.scope_queue_name(queue, project)"},{"line_number":61,"context_line":"        entry \u003d self._col.find_one({\u0027pq\u0027: key},"},{"line_number":62,"context_line":"                                   fields\u003dfields)"},{"line_number":63,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATX%2F%2F8Wc%3D","line":60,"updated":"2013-10-23 21:52:40.000000000","message":"How about using utils.scoped_query instead? If you agree, you could use it below, in the other calls, as well.","commit_id":"4c8ace0ba47468a9c0c2f0d2477f8a3e65ff2c5e"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"2f1a36b6b6908c8b57a5cb3af804028c8f5e727b","unresolved":false,"context_lines":[{"line_number":57,"context_line":"    @utils.raises_conn_error"},{"line_number":58,"context_line":"    def get(self, project, queue):"},{"line_number":59,"context_line":"        fields \u003d {\u0027_id\u0027: 0}"},{"line_number":60,"context_line":"        key \u003d utils.scope_queue_name(queue, project)"},{"line_number":61,"context_line":"        entry \u003d self._col.find_one({\u0027pq\u0027: key},"},{"line_number":62,"context_line":"                                   fields\u003dfields)"},{"line_number":63,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2F9%2Fo%3D","line":60,"in_reply_to":"AAAATX%2F%2F8Wc%3D","updated":"2013-10-24 13:48:39.000000000","message":"I\u0027ll check it out.","commit_id":"4c8ace0ba47468a9c0c2f0d2477f8a3e65ff2c5e"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"34d07226897bb100db33af8448d50512082085ec","unresolved":false,"context_lines":[{"line_number":78,"context_line":"                                                           project),"},{"line_number":79,"context_line":"                              \u0027s\u0027: shard})"},{"line_number":80,"context_line":"        except errors.DuplicateKeyError:"},{"line_number":81,"context_line":"            pass  # duplicate insertions are not a problem"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    @utils.raises_conn_error"},{"line_number":84,"context_line":"    def delete(self, project, queue):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATX%2F%2F8V0%3D","line":81,"updated":"2013-10-23 21:52:40.000000000","message":"Shouldn\u0027t you be overwriting \u0027s\u0027 then, if you are going to allow this?","commit_id":"4c8ace0ba47468a9c0c2f0d2477f8a3e65ff2c5e"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"2f1a36b6b6908c8b57a5cb3af804028c8f5e727b","unresolved":false,"context_lines":[{"line_number":78,"context_line":"                                                           project),"},{"line_number":79,"context_line":"                              \u0027s\u0027: shard})"},{"line_number":80,"context_line":"        except errors.DuplicateKeyError:"},{"line_number":81,"context_line":"            pass  # duplicate insertions are not a problem"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    @utils.raises_conn_error"},{"line_number":84,"context_line":"    def delete(self, project, queue):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2F9%2FE%3D","line":81,"in_reply_to":"AAAATX%2F%2F8V0%3D","updated":"2013-10-24 13:48:39.000000000","message":"Yeah. This is one place where I\u0027ve been inconsistent. This goes back to the PUT semantics being implemented incorrectly in the transport resource, as I did with the shards resource in the other patchset. I implemented the storage drivers with that incorrect understanding of PUT in mind, so... this happened. :P\n\nI\u0027ll think on this some more and see what I need to do to make PUT HTTP compliant and then the storage layer behave accordingly.","commit_id":"4c8ace0ba47468a9c0c2f0d2477f8a3e65ff2c5e"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"34d07226897bb100db33af8448d50512082085ec","unresolved":false,"context_lines":[{"line_number":99,"context_line":"    @utils.raises_conn_error"},{"line_number":100,"context_line":"    def drop_all(self):"},{"line_number":101,"context_line":"        self._col.drop()"},{"line_number":102,"context_line":"        self._col.ensure_index(CATALOGUE_INDEX, unique\u003dTrue)"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"def _normalize(entry):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATX%2F%2F8TQ%3D","line":102,"updated":"2013-10-23 21:52:40.000000000","message":"If initialization ever requires more than a single statement, it would be helpful to factor that out into a method that can be called from both __init__ and drop_all. Just a thought...","commit_id":"4c8ace0ba47468a9c0c2f0d2477f8a3e65ff2c5e"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"2f1a36b6b6908c8b57a5cb3af804028c8f5e727b","unresolved":false,"context_lines":[{"line_number":99,"context_line":"    @utils.raises_conn_error"},{"line_number":100,"context_line":"    def drop_all(self):"},{"line_number":101,"context_line":"        self._col.drop()"},{"line_number":102,"context_line":"        self._col.ensure_index(CATALOGUE_INDEX, unique\u003dTrue)"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"def _normalize(entry):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2F9%2B4%3D","line":102,"in_reply_to":"AAAATX%2F%2F8TQ%3D","updated":"2013-10-24 13:48:39.000000000","message":"Good thought. I\u0027ll keep that in mind. :)","commit_id":"4c8ace0ba47468a9c0c2f0d2477f8a3e65ff2c5e"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"1be54815aaa21b8cbcd31ba781e1cb0160ed7f44","unresolved":false,"context_lines":[{"line_number":56,"context_line":"    @utils.raises_conn_error"},{"line_number":57,"context_line":"    def get(self, project, queue):"},{"line_number":58,"context_line":"        fields \u003d {\u0027_id\u0027: 0}"},{"line_number":59,"context_line":"        key \u003d utils.scope_queue_name(queue, project)"},{"line_number":60,"context_line":"        entry \u003d self._col.find_one({PRIMARY_KEY: key},"},{"line_number":61,"context_line":"                                   fields\u003dfields)"},{"line_number":62,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F%2FwcM%3D","line":59,"updated":"2013-10-29 14:29:30.000000000","message":"I just noticed that the order of the params is reversed as compared to those in scoped_query(). Can you file a bug to make them consistent?","commit_id":"86d8f9e50f0ce00b10da97e860373474fcb3700d"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"43c76bb0364ffa8af63445bfd932b70e663983f2","unresolved":false,"context_lines":[{"line_number":56,"context_line":"    @utils.raises_conn_error"},{"line_number":57,"context_line":"    def get(self, project, queue):"},{"line_number":58,"context_line":"        fields \u003d {\u0027_id\u0027: 0}"},{"line_number":59,"context_line":"        key \u003d utils.scope_queue_name(queue, project)"},{"line_number":60,"context_line":"        entry \u003d self._col.find_one({PRIMARY_KEY: key},"},{"line_number":61,"context_line":"                                   fields\u003dfields)"},{"line_number":62,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F%2FwRA%3D","line":59,"in_reply_to":"AAAATn%2F%2FwcM%3D","updated":"2013-10-29 15:02:57.000000000","message":"Hmm...\n\n    def scoped_query(queue, project)\n    def scope_queue_name(queue\u003dNone, project\u003dNone)\n\nLooks right to me. Did I miss something?","commit_id":"86d8f9e50f0ce00b10da97e860373474fcb3700d"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"f455ce8380c5cb9664263e8cb635a88d82ce66f3","unresolved":false,"context_lines":[{"line_number":73,"context_line":"    @utils.raises_conn_error"},{"line_number":74,"context_line":"    def insert(self, project, queue, shard):"},{"line_number":75,"context_line":"        key \u003d utils.scope_queue_name(queue, project)"},{"line_number":76,"context_line":"        self._col.update({PRIMARY_KEY: key},"},{"line_number":77,"context_line":"                         {\u0027$set\u0027: {\u0027s\u0027: shard}}, upsert\u003dTrue)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    @utils.raises_conn_error"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAATn%2F%2Fr5U%3D","line":76,"updated":"2013-10-30 13:42:47.000000000","message":"Why are you using upsert instead of bare insert here?\n\nThe API says this method should just insert the record if it doesn\u0027t exist, but here you\u0027re updating it if it exists. Is that the desired behavior? \n\nThe other thing to consider is that upserts - updates in general - are slower than inserts.","commit_id":"a5e890140babffe3a47c44cbb4ac01ee9024e619"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"58621762dfe73d38091c43f6b384c6cd2aa91f8a","unresolved":false,"context_lines":[{"line_number":73,"context_line":"    @utils.raises_conn_error"},{"line_number":74,"context_line":"    def insert(self, project, queue, shard):"},{"line_number":75,"context_line":"        key \u003d utils.scope_queue_name(queue, project)"},{"line_number":76,"context_line":"        self._col.update({PRIMARY_KEY: key},"},{"line_number":77,"context_line":"                         {\u0027$set\u0027: {\u0027s\u0027: shard}}, upsert\u003dTrue)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    @utils.raises_conn_error"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAATn%2F%2FrRA%3D","line":76,"in_reply_to":"AAAATn%2F%2Fr5U%3D","updated":"2013-10-30 15:26:55.000000000","message":"The docs are out of date. I decided to go with a replacing behavior since this is always attached to a PUT at the transport level.\n\n\u003d\u003d\u003d\u003d\n\nIt is done. :) I kept update/insert, but refactored the common code into an _insert. I also updated the interface level docs. Thanks for the feedback!","commit_id":"a5e890140babffe3a47c44cbb4ac01ee9024e619"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"f455ce8380c5cb9664263e8cb635a88d82ce66f3","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        self._col.ensure_index(CATALOGUE_INDEX, unique\u003dTrue)"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"def _normalize(entry):"},{"line_number":101,"context_line":"    project, queue \u003d utils.parse_scoped_project_queue(entry[PRIMARY_KEY])"},{"line_number":102,"context_line":"    return {"},{"line_number":103,"context_line":"        \u0027queue\u0027: queue,"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAATn%2F%2Fr6s%3D","line":100,"updated":"2013-10-30 13:42:47.000000000","message":"TBH, I prefer having these kind of private-helpers at the top of the module. What are your preferences?","commit_id":"a5e890140babffe3a47c44cbb4ac01ee9024e619"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"58621762dfe73d38091c43f6b384c6cd2aa91f8a","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        self._col.ensure_index(CATALOGUE_INDEX, unique\u003dTrue)"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"def _normalize(entry):"},{"line_number":101,"context_line":"    project, queue \u003d utils.parse_scoped_project_queue(entry[PRIMARY_KEY])"},{"line_number":102,"context_line":"    return {"},{"line_number":103,"context_line":"        \u0027queue\u0027: queue,"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAATn%2F%2FrTg%3D","line":100,"in_reply_to":"AAAATn%2F%2Fr6s%3D","updated":"2013-10-30 15:26:55.000000000","message":"I tend to prefer to have them at the bottom, but I haven\u0027t established any particular rationale for it. I\u0027m only against having them in the middle, where it would interrupt the flow of publicly-exposed functions/classes.","commit_id":"a5e890140babffe3a47c44cbb4ac01ee9024e619"}],"marconi/queues/storage/mongodb/driver.py":[{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"b4b0e45a1a126971302a78fd933ff68deaf0818e","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    else:"},{"line_number":35,"context_line":"        MongoClient \u003d pymongo.MongoClient"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    return MongoClient(conf.uri)"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"class DataDriver(storage.DataDriverBase):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2FzvM%3D","line":37,"updated":"2013-10-28 18:46:08.000000000","message":"This was probably pulled out in the admin API feature branch, as well. I expect a tiny merge conflict there, but no biggie.","commit_id":"ca1c0b5a9c068dec60ea08ad2a4696e4b316a7f4"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"1be54815aaa21b8cbcd31ba781e1cb0160ed7f44","unresolved":false,"context_lines":[{"line_number":116,"context_line":"    def catalogue_database(self):"},{"line_number":117,"context_line":"        \"\"\"Database dedicated to the \"queues\" collection."},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"        The queues collection is separated out into it\u0027s own database"},{"line_number":120,"context_line":"        to avoid writer lock contention with the messages collections."},{"line_number":121,"context_line":"        \"\"\""},{"line_number":122,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F%2Fwbk%3D","line":119,"updated":"2013-10-29 14:29:30.000000000","message":"it\u0027s \u003d\u003d\u003e its","commit_id":"86d8f9e50f0ce00b10da97e860373474fcb3700d"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"43c76bb0364ffa8af63445bfd932b70e663983f2","unresolved":false,"context_lines":[{"line_number":116,"context_line":"    def catalogue_database(self):"},{"line_number":117,"context_line":"        \"\"\"Database dedicated to the \"queues\" collection."},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"        The queues collection is separated out into it\u0027s own database"},{"line_number":120,"context_line":"        to avoid writer lock contention with the messages collections."},{"line_number":121,"context_line":"        \"\"\""},{"line_number":122,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F%2FwQ0%3D","line":119,"in_reply_to":"AAAATn%2F%2Fwbk%3D","updated":"2013-10-29 15:02:57.000000000","message":"Gets me every time.\n\nThanks!","commit_id":"86d8f9e50f0ce00b10da97e860373474fcb3700d"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"f455ce8380c5cb9664263e8cb635a88d82ce66f3","unresolved":false,"context_lines":[{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    @decorators.lazy_property(write\u003dFalse)"},{"line_number":79,"context_line":"    def connection(self):"},{"line_number":80,"context_line":"        \"\"\"MongoDB client connection instance.\"\"\""},{"line_number":81,"context_line":"        return _connection(self.mongodb_conf)"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    @decorators.lazy_property(write\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAATn%2F%2Fr2s%3D","line":80,"updated":"2013-10-30 13:42:47.000000000","message":"+1","commit_id":"a5e890140babffe3a47c44cbb4ac01ee9024e619"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"f455ce8380c5cb9664263e8cb635a88d82ce66f3","unresolved":false,"context_lines":[{"line_number":125,"context_line":"        to avoid writer lock contention with the messages collections."},{"line_number":126,"context_line":"        \"\"\""},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"        name \u003d self.mongodb_conf.database + \u0027_catalogue\u0027"},{"line_number":129,"context_line":"        return self.connection[name]"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    @property"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAATn%2F%2Fr1U%3D","line":128,"updated":"2013-10-30 13:42:47.000000000","message":"TBH, I think we can put shards and catalogs in the same database and use `self.mongodb_conf.database` directly, instead of creating a new namespace.","commit_id":"a5e890140babffe3a47c44cbb4ac01ee9024e619"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"58621762dfe73d38091c43f6b384c6cd2aa91f8a","unresolved":false,"context_lines":[{"line_number":125,"context_line":"        to avoid writer lock contention with the messages collections."},{"line_number":126,"context_line":"        \"\"\""},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"        name \u003d self.mongodb_conf.database + \u0027_catalogue\u0027"},{"line_number":129,"context_line":"        return self.connection[name]"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    @property"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAATn%2F%2FrJ4%3D","line":128,"in_reply_to":"AAAATn%2F%2Fr1U%3D","updated":"2013-10-30 15:26:55.000000000","message":"I see what you mean. Could I address this in a later patch?\n\nBug: https://bugs.launchpad.net/marconi/+bug/1246373","commit_id":"a5e890140babffe3a47c44cbb4ac01ee9024e619"}],"marconi/queues/storage/mongodb/messages.py":[{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"b4b0e45a1a126971302a78fd933ff68deaf0818e","unresolved":false,"context_lines":[{"line_number":56,"context_line":"]"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"# NOTE(cpp-cabrera):"},{"line_number":59,"context_line":"PROJ_QUEUE \u003d utils.project_queue_key()"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"# NOTE(kgriffs): This index is for listing messages, usually"},{"line_number":62,"context_line":"# filtering out claimed ones."}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2Fzus%3D","line":59,"updated":"2013-10-28 18:46:08.000000000","message":"PROJ_QUEUE - unifying across a primary key for messages and for the catalogue look ups. Also, note my crufty \u0027NOTE\u0027. I\u0027ll fix that in a moment.","commit_id":"ca1c0b5a9c068dec60ea08ad2a4696e4b316a7f4"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"1be54815aaa21b8cbcd31ba781e1cb0160ed7f44","unresolved":false,"context_lines":[{"line_number":62,"context_line":"# NOTE(kgriffs): This index is for listing messages, usually"},{"line_number":63,"context_line":"# filtering out claimed ones."},{"line_number":64,"context_line":"ACTIVE_INDEX_FIELDS \u003d ["},{"line_number":65,"context_line":"    (PROJ_QUEUE, 1),  # Project will to be unique, so put first"},{"line_number":66,"context_line":"    (\u0027k\u0027, 1),  # Used for sorting and paging, must come before range queries"},{"line_number":67,"context_line":"    (\u0027c.e\u0027, 1),  # Used for filtering out claimed messages"},{"line_number":68,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F%2Fwbc%3D","line":65,"updated":"2013-10-29 14:29:30.000000000","message":"\"will to be\" ?","commit_id":"86d8f9e50f0ce00b10da97e860373474fcb3700d"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"43c76bb0364ffa8af63445bfd932b70e663983f2","unresolved":false,"context_lines":[{"line_number":62,"context_line":"# NOTE(kgriffs): This index is for listing messages, usually"},{"line_number":63,"context_line":"# filtering out claimed ones."},{"line_number":64,"context_line":"ACTIVE_INDEX_FIELDS \u003d ["},{"line_number":65,"context_line":"    (PROJ_QUEUE, 1),  # Project will to be unique, so put first"},{"line_number":66,"context_line":"    (\u0027k\u0027, 1),  # Used for sorting and paging, must come before range queries"},{"line_number":67,"context_line":"    (\u0027c.e\u0027, 1),  # Used for filtering out claimed messages"},{"line_number":68,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F%2FwJw%3D","line":65,"in_reply_to":"AAAATn%2F%2Fwbc%3D","updated":"2013-10-29 15:02:57.000000000","message":"Done","commit_id":"86d8f9e50f0ce00b10da97e860373474fcb3700d"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"1be54815aaa21b8cbcd31ba781e1cb0160ed7f44","unresolved":false,"context_lines":[{"line_number":69,"context_line":""},{"line_number":70,"context_line":"# For counting"},{"line_number":71,"context_line":"COUNTING_INDEX_FIELDS \u003d ["},{"line_number":72,"context_line":"    (PROJ_QUEUE, 1),  # Project will to be unique, so put first"},{"line_number":73,"context_line":"    (\u0027c.e\u0027, 1),  # Used for filtering out claimed messages"},{"line_number":74,"context_line":"]"},{"line_number":75,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F%2FwbY%3D","line":72,"updated":"2013-10-29 14:29:30.000000000","message":"\"will to be\" ?","commit_id":"86d8f9e50f0ce00b10da97e860373474fcb3700d"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"43c76bb0364ffa8af63445bfd932b70e663983f2","unresolved":false,"context_lines":[{"line_number":69,"context_line":""},{"line_number":70,"context_line":"# For counting"},{"line_number":71,"context_line":"COUNTING_INDEX_FIELDS \u003d ["},{"line_number":72,"context_line":"    (PROJ_QUEUE, 1),  # Project will to be unique, so put first"},{"line_number":73,"context_line":"    (\u0027c.e\u0027, 1),  # Used for filtering out claimed messages"},{"line_number":74,"context_line":"]"},{"line_number":75,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F%2FwJs%3D","line":72,"in_reply_to":"AAAATn%2F%2FwbY%3D","updated":"2013-10-29 15:02:57.000000000","message":"Done","commit_id":"86d8f9e50f0ce00b10da97e860373474fcb3700d"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"f455ce8380c5cb9664263e8cb635a88d82ce66f3","unresolved":false,"context_lines":[{"line_number":57,"context_line":""},{"line_number":58,"context_line":"# NOTE(cpp-cabrera): to unify use of project/queue across mongodb"},{"line_number":59,"context_line":"# storage impls."},{"line_number":60,"context_line":"PROJ_QUEUE \u003d utils.PROJ_QUEUE_KEY"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"# NOTE(kgriffs): This index is for listing messages, usually"},{"line_number":63,"context_line":"# filtering out claimed ones."}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAATn%2F%2Fr0Q%3D","line":60,"updated":"2013-10-30 13:42:47.000000000","message":"as long as we don\u0027t create a constants.py module, I\u0027m find with it :P","commit_id":"a5e890140babffe3a47c44cbb4ac01ee9024e619"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"58621762dfe73d38091c43f6b384c6cd2aa91f8a","unresolved":false,"context_lines":[{"line_number":57,"context_line":""},{"line_number":58,"context_line":"# NOTE(cpp-cabrera): to unify use of project/queue across mongodb"},{"line_number":59,"context_line":"# storage impls."},{"line_number":60,"context_line":"PROJ_QUEUE \u003d utils.PROJ_QUEUE_KEY"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"# NOTE(kgriffs): This index is for listing messages, usually"},{"line_number":63,"context_line":"# filtering out claimed ones."}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAATn%2F%2FrJ0%3D","line":60,"in_reply_to":"AAAATn%2F%2Fr0Q%3D","updated":"2013-10-30 15:26:55.000000000","message":"Haha, agreed. :D","commit_id":"a5e890140babffe3a47c44cbb4ac01ee9024e619"}],"marconi/queues/storage/mongodb/queues.py":[{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"b4b0e45a1a126971302a78fd933ff68deaf0818e","unresolved":false,"context_lines":[{"line_number":185,"context_line":"            query[\u0027p_q\u0027] \u003d {\u0027$regex\u0027: \u0027^/\u0027}"},{"line_number":186,"context_line":"        else:"},{"line_number":187,"context_line":"            # NOTE(kgriffs): unscoped queue, e.g., \u0027/my-global-queue\u0027"},{"line_number":188,"context_line":"            query[\u0027p_q\u0027] \u003d {\u0027$regex\u0027: \u0027^/\u0027, \u0027$gt\u0027: scoped_name}"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"        fields \u003d {\u0027p_q\u0027: 1, \u0027_id\u0027: 0}"},{"line_number":191,"context_line":"        if detailed:"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2Fzuo%3D","side":"PARENT","line":188,"updated":"2013-10-28 18:46:08.000000000","message":"Replaced by scoped_query in utils.py.","commit_id":"142c7ae0d64be0f1b18ed6e12827dbd1dd8babb9"}],"marconi/queues/storage/mongodb/utils.py":[{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"344edcd15f7969ce54d2c89aa81f5227b4bfa7cb","unresolved":false,"context_lines":[{"line_number":209,"context_line":"        # NOTE(kgriffs): unscoped queue, e.g., \u0027/my-global-queue\u0027"},{"line_number":210,"context_line":"        query[key] \u003d {\u0027$regex\u0027: \u0027^/\u0027, \u0027$gt\u0027: scoped_name}"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    return query"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"def get_partition(num_partitions, queue, project\u003dNone):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATX%2F%2F%2BBA%3D","line":212,"updated":"2013-10-23 14:34:09.000000000","message":"Making paginated, \u0027p_q\u0027-based queries easy for all the controllers.","commit_id":"84932933aba292b07aae06033e83a65f034da0bd"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"34d07226897bb100db33af8448d50512082085ec","unresolved":false,"context_lines":[{"line_number":172,"context_line":"    return scoped_name.partition(\u0027/\u0027)[2] or None"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"def descope_entry(scoped_name):"},{"line_number":176,"context_line":"    \"\"\"Returns the project and queue name for a scoped catalogue entry."},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"    :param scoped_name: a project/queue as given by :scope_queue_name:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATX%2F%2F8Rs%3D","line":175,"updated":"2013-10-23 21:52:40.000000000","message":"This name doesn\u0027t seem right. You are acting on a scoped name, not an \"entry\", so it confused me at first glance. :p\n\nHow about something along the lines of \"parse_queue_name\" or \"split_queue_name\", etc.?","commit_id":"4c8ace0ba47468a9c0c2f0d2477f8a3e65ff2c5e"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"2f1a36b6b6908c8b57a5cb3af804028c8f5e727b","unresolved":false,"context_lines":[{"line_number":172,"context_line":"    return scoped_name.partition(\u0027/\u0027)[2] or None"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"def descope_entry(scoped_name):"},{"line_number":176,"context_line":"    \"\"\"Returns the project and queue name for a scoped catalogue entry."},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"    :param scoped_name: a project/queue as given by :scope_queue_name:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2F9%2B0%3D","line":175,"in_reply_to":"AAAATX%2F%2F8Rs%3D","updated":"2013-10-24 13:48:39.000000000","message":"+1 for parse_queue_name. I\u0027ll update it.","commit_id":"4c8ace0ba47468a9c0c2f0d2477f8a3e65ff2c5e"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"34d07226897bb100db33af8448d50512082085ec","unresolved":false,"context_lines":[{"line_number":183,"context_line":"    return scoped_name.split(\u0027/\u0027)"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"def scoped_query(queue, project, key):"},{"line_number":187,"context_line":"    \"\"\"Returns a dict usable for querying for scoped project/queues."},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"    :param queue: name of queue to seek"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATX%2F%2F8Rk%3D","line":186,"updated":"2013-10-23 21:52:40.000000000","message":"If we settled on a consistent naming convention for key, then we could drop that param from the method. Just a thought...","commit_id":"4c8ace0ba47468a9c0c2f0d2477f8a3e65ff2c5e"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"2f1a36b6b6908c8b57a5cb3af804028c8f5e727b","unresolved":false,"context_lines":[{"line_number":183,"context_line":"    return scoped_name.split(\u0027/\u0027)"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"def scoped_query(queue, project, key):"},{"line_number":187,"context_line":"    \"\"\"Returns a dict usable for querying for scoped project/queues."},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"    :param queue: name of queue to seek"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2F9%2BU%3D","line":186,"in_reply_to":"AAAATX%2F%2F8Rk%3D","updated":"2013-10-24 13:48:39.000000000","message":"Good point - I\u0027m +1 for \u0027p_q\u0027, so I\u0027ll make the updates.","commit_id":"4c8ace0ba47468a9c0c2f0d2477f8a3e65ff2c5e"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"1be54815aaa21b8cbcd31ba781e1cb0160ed7f44","unresolved":false,"context_lines":[{"line_number":183,"context_line":"    return scoped_name.split(\u0027/\u0027)"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"def project_queue_key():"},{"line_number":187,"context_line":"    \"\"\"Returns the authoritative form of project/queue keys."},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"    This was written to unify the way other mongodb controllers use"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F%2FwXk%3D","line":186,"updated":"2013-10-29 14:29:30.000000000","message":"Why not just replace this with a constant and reference it directly?","commit_id":"86d8f9e50f0ce00b10da97e860373474fcb3700d"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"43c76bb0364ffa8af63445bfd932b70e663983f2","unresolved":false,"context_lines":[{"line_number":183,"context_line":"    return scoped_name.split(\u0027/\u0027)"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"def project_queue_key():"},{"line_number":187,"context_line":"    \"\"\"Returns the authoritative form of project/queue keys."},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"    This was written to unify the way other mongodb controllers use"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F%2FwQI%3D","line":186,"in_reply_to":"AAAATn%2F%2FwXk%3D","updated":"2013-10-29 15:02:57.000000000","message":"Sounds like a good idea. I was thinking in terms of functions this whole time, so I lost sight of the notion of using a global. :P","commit_id":"86d8f9e50f0ce00b10da97e860373474fcb3700d"}],"marconi/queues/storage/pipeline.py":[{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"1be54815aaa21b8cbcd31ba781e1cb0160ed7f44","unresolved":false,"context_lines":[{"line_number":113,"context_line":"        return stages"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    @decorators.lazy_property(write\u003dFalse)"},{"line_number":116,"context_line":"    def catalogue_controller(self):"},{"line_number":117,"context_line":"        stages \u003d _get_storage_pipeline(\u0027catalogue\u0027, self._conf)"},{"line_number":118,"context_line":"        stages.append(self._storage.catalogue_controller)"},{"line_number":119,"context_line":"        return stages"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F%2FwXw%3D","line":116,"updated":"2013-10-29 14:29:30.000000000","message":"Not needed; the control plane does not go through the pipeline.","commit_id":"86d8f9e50f0ce00b10da97e860373474fcb3700d"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"43c76bb0364ffa8af63445bfd932b70e663983f2","unresolved":false,"context_lines":[{"line_number":113,"context_line":"        return stages"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    @decorators.lazy_property(write\u003dFalse)"},{"line_number":116,"context_line":"    def catalogue_controller(self):"},{"line_number":117,"context_line":"        stages \u003d _get_storage_pipeline(\u0027catalogue\u0027, self._conf)"},{"line_number":118,"context_line":"        stages.append(self._storage.catalogue_controller)"},{"line_number":119,"context_line":"        return stages"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F%2FwQA%3D","line":116,"in_reply_to":"AAAATn%2F%2FwXw%3D","updated":"2013-10-29 15:02:57.000000000","message":"Done","commit_id":"86d8f9e50f0ce00b10da97e860373474fcb3700d"}],"marconi/queues/storage/sharding.py":[{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"b4b0e45a1a126971302a78fd933ff68deaf0818e","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    @decorators.lazy_property(write\u003dFalse)"},{"line_number":55,"context_line":"    def catalogue_controller(self):"},{"line_number":56,"context_line":"        return CatalogueController(self._shard_catalog)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"class RoutingController(storage.base.ControllerBase):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2Fzug%3D","line":56,"updated":"2013-10-28 18:46:08.000000000","message":"This shouldn\u0027t be here.","commit_id":"ca1c0b5a9c068dec60ea08ad2a4696e4b316a7f4"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"b4b0e45a1a126971302a78fd933ff68deaf0818e","unresolved":false,"context_lines":[{"line_number":135,"context_line":""},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"class CatalogueController(RoutingController):"},{"line_number":138,"context_line":"    _resource_name \u003d \u0027catalogue\u0027"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"class Catalog(object):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2FzuY%3D","line":138,"updated":"2013-10-28 18:46:08.000000000","message":"Same here.","commit_id":"ca1c0b5a9c068dec60ea08ad2a4696e4b316a7f4"}],"marconi/tests/queues/storage/base.py":[{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"1be54815aaa21b8cbcd31ba781e1cb0160ed7f44","unresolved":false,"context_lines":[{"line_number":651,"context_line":"        self.assertFalse(self.controller.exists(project, queue))"},{"line_number":652,"context_line":""},{"line_number":653,"context_line":"        # verify it isn\u0027t listable"},{"line_number":654,"context_line":"        self.assertEqual(len(list(self.controller.list(project))), 0)"},{"line_number":655,"context_line":""},{"line_number":656,"context_line":"    def test_list(self):"},{"line_number":657,"context_line":"        with helpers.shard_entries(self.controller, 10) as expect:"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F%2FwZ8%3D","line":654,"updated":"2013-10-29 14:29:30.000000000","message":"Should this raise an error if the project does not exist?","commit_id":"86d8f9e50f0ce00b10da97e860373474fcb3700d"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"43c76bb0364ffa8af63445bfd932b70e663983f2","unresolved":false,"context_lines":[{"line_number":651,"context_line":"        self.assertFalse(self.controller.exists(project, queue))"},{"line_number":652,"context_line":""},{"line_number":653,"context_line":"        # verify it isn\u0027t listable"},{"line_number":654,"context_line":"        self.assertEqual(len(list(self.controller.list(project))), 0)"},{"line_number":655,"context_line":""},{"line_number":656,"context_line":"    def test_list(self):"},{"line_number":657,"context_line":"        with helpers.shard_entries(self.controller, 10) as expect:"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F%2FwPo%3D","line":654,"in_reply_to":"AAAATn%2F%2FwZ8%3D","updated":"2013-10-29 15:02:57.000000000","message":"I don\u0027t think so. Given that keys are stored in the form \u0027p/q\u0027, and given that we query mongodb filter-style (```find()```), it\u0027d be hard to tell apart the case of a project not existing from the case of a project lacking any queues.","commit_id":"86d8f9e50f0ce00b10da97e860373474fcb3700d"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"1be54815aaa21b8cbcd31ba781e1cb0160ed7f44","unresolved":false,"context_lines":[{"line_number":669,"context_line":"            entry \u003d self.controller.get(p, q)"},{"line_number":670,"context_line":"            self._check_value(entry, xqueue\u003dq, xproject\u003dp, xshard\u003du\u0027b\u0027)"},{"line_number":671,"context_line":""},{"line_number":672,"context_line":"    def test_get(self):"},{"line_number":673,"context_line":"        with helpers.shard_entry(self.controller,"},{"line_number":674,"context_line":"                                 self.project,"},{"line_number":675,"context_line":"                                 self.queue, u\u0027a\u0027) as expect:"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F%2FwYs%3D","line":672,"updated":"2013-10-29 14:29:30.000000000","message":"Can you add a test for \"get\" when the entry does not exist?","commit_id":"86d8f9e50f0ce00b10da97e860373474fcb3700d"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"43c76bb0364ffa8af63445bfd932b70e663983f2","unresolved":false,"context_lines":[{"line_number":669,"context_line":"            entry \u003d self.controller.get(p, q)"},{"line_number":670,"context_line":"            self._check_value(entry, xqueue\u003dq, xproject\u003dp, xshard\u003du\u0027b\u0027)"},{"line_number":671,"context_line":""},{"line_number":672,"context_line":"    def test_get(self):"},{"line_number":673,"context_line":"        with helpers.shard_entry(self.controller,"},{"line_number":674,"context_line":"                                 self.project,"},{"line_number":675,"context_line":"                                 self.queue, u\u0027a\u0027) as expect:"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F%2FwPk%3D","line":672,"in_reply_to":"AAAATn%2F%2FwYs%3D","updated":"2013-10-29 15:02:57.000000000","message":"Done\n\nI\u0027ve also added similar tests for update. :)","commit_id":"86d8f9e50f0ce00b10da97e860373474fcb3700d"}]}
