vapor_master icon indicating copy to clipboard operation
vapor_master copied to clipboard

use `deleteMany` for db cleaning

Open sevenbitbyte opened this issue 6 years ago • 0 comments

DB cleaning as currently implemented could result in high network activity during cleanup. Use mongo db delete command instead

Current implementation

  • https://github.com/roshub/vapor-master/blob/master/src/master.js#L33
  • https://github.com/roshub/vapor-master/blob/master/src/core-util.js#L9
  • https://github.com/roshub/vapor-master/blob/master/src/service-util.js#L7

https://mongoosejs.com/docs/api.html#model_Model.deleteMany

https://docs.mongodb.com/manual/reference/method/db.collection.deleteMany/

sevenbitbyte avatar Oct 30 '18 23:10 sevenbitbyte