0

DeleteResult deleteResult = mongoTemplate.remove(query, collection);如果条件是in的话是异步的吗?我测试频繁删除插入时 会出现插入后再将某几条数据删掉的情况

Set<Long> analysisTimeSet = new HashSet<>();
set.add(...)
......
Query query = new Query(Criteria.where("analysisTime").in(analysisTimeSet));
DeleteResult deleteResult = mongoTemplate.remove(query, collection);
更改状态以发布