Redis, for example.
You submit a bgrewriteaof. You will get a reply immediately. That is, the connection between the program and redis ends. Redis himself was quietly performing the operation.
Does mongodb have similar command parameters? For example, I remove a batch of object. Nima waited for more than 30 minutes … = =. Is there just a db.collection.remove ({param}, {background: true})? = =
See here:http://docs.mongodb.org/manual/reference/write-concern/
MongoDB default
w=1
. You can send onew=0
Tell MongoDB that you don’t want to wait for its write operation to complete.