[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.


Generated at Thu Feb 08 03:30:42 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.