[SERVER-64854] Allow external clients to set maxTimeMSOpOnly Created: 23/Mar/22 Updated: 06/Dec/22 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Shane Harvey | Assignee: | Backlog - Query Execution |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Assigned Teams: |
Query Execution
|
||||
| Sprint: | Service Arch 2022-05-30, Service Arch 2022-06-13 | ||||
| Participants: | |||||
| Description |
|
In DRIVERS-555 we use maxTimeMS on every command in to impose a time limit on operations. This allows drivers to reuse connections after the timeout expires. One problem is that maxTimeMS for find/aggregate/getMore commands does not work the same as maxTimeMS on every other command. This means that the driver can't set a proper timeout for a cursor getMore. Instead, we send the getMore to the server without the maxTimeMS field and then use the connection timeout to cancel the request. This is unfortunate because a connection timeout means the connection needs to be closed. A useful improvement would be for the server to support a maxTimeMS mechanism for find/aggregate/getMore which works identically to maxTimeMS for all other commands. To preserve backwards compatibility (at least for getMore, and possibly for find/aggregate as well), we would need to introduce a new field (maybe "maxTimeoutMS"). Edit: max.hirschhorn pointed out that this feature already exists but is internal only:
I would like to request that the server allow external clients set maxTimeMSOpOnly so that we can have consistent behavior for find/aggregate/getMore commands. |
| Comments |
| Comment by Edwin Zhou [ 24/Mar/22 ] |
|
Thanks for the clarification shane.harvey. |
| Comment by Max Hirschhorn [ 24/Mar/22 ] |
|
The maxTimeMSOpOnly option was introduced by |
| Comment by Shane Harvey [ 24/Mar/22 ] |
|
Thanks Max! maxTimeMSOpOnly is exactly the behavior I am looking for. What server ticket+version was it added? Is it available to use in drivers? |
| Comment by Max Hirschhorn [ 24/Mar/22 ] |
|
I know the Service Arch team added maxTimeMSOpOnly to overcome the difference in meaning for maxTimeMS between the getMore command and other commands. I'm not sure whether that is an intermediate option for the Drivers team. Is the request for having consistent semantics something already being tracked under SERVER-34277? |