[CONPY-161] get_connection returns None due to low precision of time.monotonic Created: 2021-08-22 Updated: 2022-07-07 Resolved: 2021-08-22 |
|
| Status: | Closed |
| Project: | MariaDB Connector/Python |
| Component/s: | Connection Pooling |
| Affects Version/s: | 1.1.0a1 |
| Fix Version/s: | 1.1.0b1 |
| Type: | Bug | Priority: | Major |
| Reporter: | Georg Richter | Assignee: | Georg Richter |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Windows only |
||
| Python Version: | 3.9 |
| Description |
|
When creating a connection pool with new connections, we store value obtained from time.monotonic() in internal last_used status attribute. Apparently the resolution of time.monotonic is no high enough, so all connections may get the same value. Since the assumption having different time values may fail, get_connection may return no handle. |