[JAVA-3166] Improve MongoWaitQueueFullException message Created: 08/Feb/19  Updated: 28/Oct/23  Resolved: 02/May/19

Status: Closed
Project: Java Driver
Component/s: Connection Management, Error Handling
Affects Version/s: None
Fix Version/s: 3.11.0

Type: Improvement Priority: Minor - P4
Reporter: Mark Paluch Assignee: Jeffrey Yemin
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

MongoWaitQueueFullException is created with two messages:

  • Too many threads are already waiting for a connection. Max number of threads (maxWaitQueueSize) of %d has been exceeded.
  • Too many operations are already waiting for a server. Max number of operations (maxWaitQueueSize) of %d has been exceeded.

The exception message is the same regardless of the acquisition mode (synchronous/asynchronous). When using the e.g. Reactive Streams driver, one can easily assume that MongoDB creates up to %d threads.

I suggest aligning the wording towards "too many operations" to remove confusion about threads.



 Comments   
Comment by Githook User [ 02/May/19 ]

Author:

{'email': 'jeff.yemin@10gen.com', 'name': 'Jeff Yemin', 'username': 'jyemin'}

Message: Change "threads" to "operations" in exception message

Consistently refer to operations rather than threads in
MongoWaitQueueFullException exception messages, so it doesn't imply
that threads are being used by the asynchronous driver.

JAVA-3166
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/f2e99dd0f383dcf6c619f795f4f03691f863f4ee

Generated at Thu Feb 08 08:58:56 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.