You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #252, we discussed a bug that occurred when a notification arrived while reading query results. That bug was fixed by @Emill, but a few issues remain:
The current implementation drains notifications correctly, but not other types of asynchronous messages that may arrive. For example, if a ParameterStatus or Notice message arrives while we're reading a query result, ReadSingleMessage will block forever: it knows not to ignore notifications, but it does ignore other async messages.
The draining is currently is currently in the NotificationBlock class, and is therefore linked to async notifications - not so good. We should actually not be using NotificationBlock at all if async notifications aren't turned on, but draining should still happen. We should probably perform the draining whenever the connector state is set to Ready.
Add an invariant (code contracts) that when the connector state is Ready, the buffer is empty.
One elegant solution would be to manage this would be to do draining, but also NotificationBlock management, as part of the connector state transition mechanism. So when someone does State=Ready we drain and release the async notification semaphore, and when someone transitions us out of Ready to Executing/Fetching/Copy we acquire the async notification semaphore.
Activity
[-]Drain read buffer of messages after queries[/-][+]Fixes to read buffer draining after queries[/+]Work on some async message handling
Work on connection locking
Implemented keepalive and related corrections