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
var results = provider.AggregationSet().GroupBy(user => user.RecordShell.SessionId).CountGroupMembers().ToList();
It correctly gets the results, but looking in the Debug Output, it is throwing an exception every time. I debugged into it and it appears like in the Dispose method of the AggregationEnumerator, if the _cursor is not 0, we try and delete the cursor. The only problem is UseCursor is set to false in this case, so _cursor defaults to -1 and never changes. Since it is not 0, we try and delete it and it fails with ERR invalid cursor.
Seems like if _cursor is -1 or UseCursor is false in the Dispose method, we should not be trying to delete the cursor and waste the overhead of executing another command and throwing an exception.
The text was updated successfully, but these errors were encountered:
I updated the Dispose method to early out if cursor is 0 or -1 and the average latency for the aggregate call went from 40 ms to 10 ms and obviously didn't log exceptions on every call anymore
I am running a simple aggregation like this:
var results = provider.AggregationSet().GroupBy(user => user.RecordShell.SessionId).CountGroupMembers().ToList();
It correctly gets the results, but looking in the Debug Output, it is throwing an exception every time. I debugged into it and it appears like in the Dispose method of the AggregationEnumerator, if the _cursor is not 0, we try and delete the cursor. The only problem is UseCursor is set to false in this case, so _cursor defaults to -1 and never changes. Since it is not 0, we try and delete it and it fails with ERR invalid cursor.
Seems like if _cursor is -1 or UseCursor is false in the Dispose method, we should not be trying to delete the cursor and waste the overhead of executing another command and throwing an exception.
The text was updated successfully, but these errors were encountered: