Details
Description
User deletes on capped collections became possible in SERVER-63201. However, when the delete on the capped collection is performed via a collection scan, a CappedPositionLost write error is returned back to the client. There are couple issues with this behavior:
- For limit:1 deletes (aka single-delete) 1 document is actually deleted but n:0 is returned in addition to the CappedPositionLost write error.
- For limit:0 deletes (aka multi-deletes) no documents are deleted, n:0 is returned in addition to the CappedPositionLost write error. The reporting here is accurate but we should probably make it possible to clear a capped collection.
[js_test:repro_capped_user_delete] "n" : 0,
|
[js_test:repro_capped_user_delete] "writeErrors" : [
|
[js_test:repro_capped_user_delete] {
|
[js_test:repro_capped_user_delete] "index" : 0,
|
[js_test:repro_capped_user_delete] "code" : 136,
|
[js_test:repro_capped_user_delete] "errmsg" : "CollectionScan died due to position in capped collection being deleted. Last seen record id: RecordId(1)"
|
[js_test:repro_capped_user_delete] }
|
[js_test:repro_capped_user_delete] ],
|
[js_test:repro_capped_user_delete] "ok" : 1,
|
Attachments
Issue Links
- is caused by
-
SERVER-63201 Relax restriction of deletion ops in applyOps command.
-
- Closed
-