Particular / NServiceBus.RavenDB

https://docs.particular.net/nservicebus/ravendb/
Other
10 stars 17 forks source link

Set MaxOpsPerSec on bulk operation options for outbox cleanup #407

Closed ramonsmits closed 4 years ago

ramonsmits commented 6 years ago

It was advised by Grisha from RavenDB to add a MaxOpsPerSec value to the bulk operation options for outbox cleanup:

https://github.com/Particular/NServiceBus.RavenDB/blob/7ac3cd1b5c443bf836d91c211db248cbff2b8ec7/src/NServiceBus.RavenDB/Outbox/OutboxRecordsCleaner.cs#L38-L44

After requesting guidance on the value to use it is clear that:

danielmarbach commented 4 years ago

Discussed this with Ramon. We switched away from DeleteByIndex to use DeleteByQueryOperation as the documentation states

Batching and Concurrency The deletion of documents matching a specified query is run in batches of size 1024. RavenDB doesn't do concurrency checks during the operation so it can happen than a document has been updated or deleted meanwhile.

https://ravendb.net/docs/article-page/4.2/Csharp/client-api/operations/delete-by-query

the batch size is already 1024 and handled efficiently by the server. Since we do not backport performance enhancements I'm going to close this one.