[SERVER-42087] Delete query with limit in query does not delete Created: 04/Jul/19 Updated: 05/Jul/19 Resolved: 05/Jul/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | 4.0.9 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Debeissat Nicolas | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Operating System: | ALL | ||||||||||||
| Steps To Reproduce: | Execute a deleteMany request with a limit parameter like : db.domainevents.deleteMany( { aggregateIdentifier: "2f13501d-6199-425d-899f-cbd51488ec24", limit: "0" })
|
||||||||||||
| Participants: | |||||||||||||
| Description |
|
Hello The following request does not delete anything : db.domainevents.deleteMany( { aggregateIdentifier: "2f13501d-6199-425d-899f-cbd51488ec24", limit: "0" }) We have no way to change the sent request in order to remove that "limit" parameters as we are using mongo java driver (https://github.com/mongodb/mongo-java-driver) behind axon (https://github.com/AxonFramework/AxonFramework) The following code : systematically adds limit parameter in the request : writer.writeInt32("limit", deleteRequest.isMulti() ? 0 : 1); I will create an issue in that project as well.
So we are stuck with that request, and mongodb has no reason not to delete the documents ?
Thanks for mongodb |
| Comments |
| Comment by Ross Lawley [ 05/Jul/19 ] |
|
Handling in the JAVA ticket. Will reopen if needs be. |