[SERVER-64557] BatchedDeleteStage should consider yielding based on document and time targets Created: 16/Mar/22 Updated: 09/May/22 Resolved: 09/May/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Haley Connelly | Assignee: | Josef Ahmad |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | PM-2227-M3 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Sprint: | Execution Team 2022-04-18, Execution Team 2022-05-02, Execution Team 2022-05-16 | ||||||||
| Participants: | |||||||||
| Description |
|
Documents that are fetched during the BatchedDeletePhase must be refetched if the snapshot changes before the batch is ready for the delete. We need to ensure the YieldPolicy tied to the BatchedDeleteStage limits auto yields that cause the snapshot to be abandoned. |
| Comments |
| Comment by Josef Ahmad [ 09/May/22 ] |
|
With Closing this ticket as Won't Do, as the batched deleter performance with the current auto-yielding policy appears to be satisfactory. |
| Comment by Josef Ahmad [ 04/May/22 ] |
|
We can reduce the refetches considerably by setting a lower default for batchedDeletesTargetStagedDocBytes. By setting this target to 2MB instead of the current 30MB, we get zero refetches with on a mass deletion with 10MB documents, with roughly the same negligible rate of refetches with the 1kB document test. Below are the metrics of the 10MB workload with batchedDeletesTargetStagedDocBytes set to 2MB. Note the throughput speed-up compared to the chart in my previous comment (serverStatus batchedDeletes docs rate).
|
| Comment by Haley Connelly [ 13/Apr/22 ] |
|
We are still waiting on design decisions for the best course of action here. This ticket is blocked until we come to a consensus. |
| Comment by Josef Ahmad [ 01/Apr/22 ] |
|
If it helps to make an informed decision, I've run an instrumented version of the server that reports the refetches of staged documents due to yielding. On a mass deletion of 1kB sized documents, we refetch less than 1 document every On a mass deletion of 10MB sized documents, we actually end up refetching almost every document. This is probably because the target batch size of 10 documents actually commits 2-3 documents per batch, as we meet the targetBatchTime of 5ms. This means that we'll likely yield before the next iteration or the following one, so we're likely to refetch some of the remaining staged documents. |