-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
Execution Team 2020-11-02, Execution Team 2020-11-16
When deleting a document, we perform two reads (and thus make two copies) of the document before actually deleting it.
At least one document read is required to generate the keys to delete index entries, but this path could be optimized to only perform one read.
The first read can happen in either the IXSCAN+FETCH or COLLSCAN stages. The document is then passed to the WorkingSet.
The second read happens in Collection::deleteDocument. This second read is not technically required because at the point where we delete the document, we already have a version of the document from the WorkingSet.