spring-data-mongodb
spring-data-mongodb copied to clipboard
Support for Client-Side Operation Timeout
WHAT
Add support for MongoDb's client-side operation timeout (CSOT) which was introduced as an experimental feature in recent versions of the Sync as well as Reactive Streams Java drivers.
WHY
Operation timeouts are an essential tool to prevent long-running and/or expensive queries from impacting a cluster. Right now, it is possible to specify multiple timeout settings on a connection/client level as well as per operation (e.g., maxTimeMS). It would be beneficial to expand the control users have by allowing for overriding timeoutMS on a per-operation basis as wel..
REFERENCES
- https://github.com/mongodb/specifications/blob/master/source/client-side-operations-timeout/client-side-operations-timeout.md
- https://www.mongodb.com/docs/languages/java/reactive-streams-driver/current/connect-to-mongo/csot/
- https://www.mongodb.com/docs/drivers/java/sync/current/connection/specify-connection-options/csot/
@gillesbergerp I love the idea. Might be worth looking into once the feature is no longer considered experimental.
I am not aware of the precedence when it comes to supporting alpha features but would it be an option to introduce this in an experimental state already? If that is acceptable, I can offer to prepare a pull request.