[CDRIVER-2232] Read preference allows int64_t maxStalenessSeconds but URI is limited to int32_t Created: 03/Aug/17 Updated: 04/Aug/17 Resolved: 04/Aug/17 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | uri |
| Affects Version/s: | 1.6.3 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Jeremy Mikola | Assignee: | Unassigned |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Description |
|
When maxStalenessSeconds was reverted from a double to an integer and the 90 second limit was added (SPEC-786), the patch for Was this intentional or an inadvertent inconsistency? The specification does not refer to any upper limit for the option, and schwerin's comment in SPEC-786 implies that a 64-bit value is perfectly valid. |
| Comments |
| Comment by Jeremy Mikola [ 04/Aug/17 ] |
|
jesse: That works for me. The PHP driver already enforces a 32-bit limit when we parse the option through the URI options array and our ReadPreference constructor, so I will keep that in place and ensure we document it. |
| Comment by A. Jesse Jiryu Davis [ 04/Aug/17 ] |
|
I propose closing this "wontfix". Fixing it will allow maxStalenessSeconds over 2 billion, which is 63 years, which doesn't seem useful. In exchange, it'll add some complexity to the URI parser, which currently benefits from the simplifying assumption that all numbers are int32. |