)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"c2a41d8d2fc39df1eeb5a91152b6adb62fd9888d","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Use mongodb delete_one method instead of deprecated remove method."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"when delete queue with mongodb storage, there was warning "},{"line_number":10,"context_line":"\"remove is deprecated. Use delete_one or delete_many \". "},{"line_number":11,"context_line":"so we can replace remove with delete_one method now"},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"3f1d235d_90f85a7b","line":9,"updated":"2017-07-05 03:29:44.000000000","message":"Pls remove the space.","commit_id":"4dbf04b78224779c1abd04faa893a6c4bf763a57"}],"zaqar/storage/mongodb/messages.py":[{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"c2a41d8d2fc39df1eeb5a91152b6adb62fd9888d","unresolved":false,"context_lines":[{"line_number":227,"context_line":"        \"\"\""},{"line_number":228,"context_line":"        scope \u003d utils.scope_queue_name(queue_name, project)"},{"line_number":229,"context_line":"        collection \u003d self._collection(queue_name, project)"},{"line_number":230,"context_line":"        collection.delete_one({PROJ_QUEUE: scope})"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"    def _list(self, queue_name, project\u003dNone, marker\u003dNone,"},{"line_number":233,"context_line":"              echo\u003dFalse, client_uuid\u003dNone, projection\u003dNone,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f1d235d_100d6aa0","line":230,"updated":"2017-07-05 03:29:44.000000000","message":"It\u0027s not one item. So to be safe, I think we should use http://api.mongodb.com/python/current/api/pymongo/collection.html?_ga\u003d2.102951749.496961176.1499225199-1383379107.1499225199#pymongo.collection.Collection.delete_many","commit_id":"4dbf04b78224779c1abd04faa893a6c4bf763a57"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"c2a41d8d2fc39df1eeb5a91152b6adb62fd9888d","unresolved":false,"context_lines":[{"line_number":711,"context_line":"        }"},{"line_number":712,"context_line":""},{"line_number":713,"context_line":"        collection \u003d self._collection(queue_name, project)"},{"line_number":714,"context_line":"        collection.delete_one(query)"},{"line_number":715,"context_line":""},{"line_number":716,"context_line":"    @utils.raises_conn_error"},{"line_number":717,"context_line":"    @utils.retries_on_autoreconnect"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f1d235d_f0966e3e","line":714,"updated":"2017-07-05 03:29:44.000000000","message":"ditto","commit_id":"4dbf04b78224779c1abd04faa893a6c4bf763a57"}],"zaqar/storage/mongodb/subscriptions.py":[{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"db2dad29ba4e707f0daafcd81838c241bf458e9e","unresolved":false,"context_lines":[{"line_number":157,"context_line":"    def delete(self, queue, subscription_id, project\u003dNone):"},{"line_number":158,"context_line":"        self._collection.delete_one({\u0027_id\u0027: utils.to_oid(subscription_id),"},{"line_number":159,"context_line":"                                     \u0027p\u0027: project,"},{"line_number":160,"context_line":"                                     \u0027s\u0027: queue}, w\u003d0)"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"    @utils.raises_conn_error"},{"line_number":163,"context_line":"    def get_with_subscriber(self, queue, subscriber, project\u003dNone):"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff0f0b1f_3d15a2e5","line":160,"range":{"start_line":160,"start_character":50,"end_line":160,"end_character":53},"updated":"2017-05-24 15:40:27.000000000","message":"seem delete_one can\u0027t be used like this.","commit_id":"317a54e385de4af94549aa38575da5cd6a0042f4"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"b9930bc16b219803f5ab109a420ac98ee57e221a","unresolved":false,"context_lines":[{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    @utils.raises_conn_error"},{"line_number":157,"context_line":"    def delete(self, queue, subscription_id, project\u003dNone):"},{"line_number":158,"context_line":"        self._collection.remove({\u0027_id\u0027: utils.to_oid(subscription_id),"},{"line_number":159,"context_line":"                                 \u0027p\u0027: project,"},{"line_number":160,"context_line":"                                 \u0027s\u0027: queue}, w\u003d0)"},{"line_number":161,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3f1d235d_db978b3a","side":"PARENT","line":158,"updated":"2017-07-09 23:46:48.000000000","message":"I have search the writeconcern parameter for delete_one, but I didn\u0027t get a good answer, so could you please help confirm if it\u0027s safe to remove the writeconcern parameter here? Thanks.","commit_id":"eb5d08e1adf9f004249f30dfe3260ace73984d3e"},{"author":{"_account_id":21387,"name":"gecong","email":"ge.cong@zte.com.cn","username":"gecong"},"change_message_id":"a508a1ba2a1731760f212dfd4dad23d97055e37f","unresolved":false,"context_lines":[{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    @utils.raises_conn_error"},{"line_number":157,"context_line":"    def delete(self, queue, subscription_id, project\u003dNone):"},{"line_number":158,"context_line":"        self._collection.remove({\u0027_id\u0027: utils.to_oid(subscription_id),"},{"line_number":159,"context_line":"                                 \u0027p\u0027: project,"},{"line_number":160,"context_line":"                                 \u0027s\u0027: queue}, w\u003d0)"},{"line_number":161,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3f1d235d_a16820ba","side":"PARENT","line":158,"in_reply_to":"3f1d235d_db978b3a","updated":"2017-07-10 02:24:00.000000000","message":"Thanks for review, I checked all the mongodb api references.see [1][2][3]\n\tIn current code, we Pass w\u003d0 to disables write acknowledgement and all other write concern options.\t\n\tin mongodb driver, if mongodb versions below 2.6, the default write_concern is majority ,\n\tif we remove w\u003d0, write_concern is set to default value , which is safer than before. \n\t\n\t[1]http://api.mongodb.com/python/2.9.5/api/pymongo/collection.html\n\t[2]https://docs.mongodb.com/manual/reference/write-concern/\n\t[3]https://docs.mongodb.com/manual/reference/method/db.collection.deleteOne/#db.collection.deleteOne\n\t[4]https://docs.mongodb.com/manual/core/replica-set-write-concern/","commit_id":"eb5d08e1adf9f004249f30dfe3260ace73984d3e"}]}
