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
Fix: PineconeGrpcFuture blocks during construction (#478)
## Problem
When using grpc with `async_req=True`, the construction of a
`PineconeGrpcFuture` would call `_sync_state`, which would do a blocking
call to `grpc_future.exception(...)`. This means that the async reqs
were all blocking in practice.
Describe the purpose of this change. What problem is being solved and
why?
## Solution
We can fix it by checking if the future is still running and not doing
any blocking calls when it is.
## Type of Change
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] This change requires a documentation update
- [ ] Infrastructure change (CI configs, etc)
- [ ] Non-code change (docs, etc)
- [ ] None of the above: (explain here)
## Test Plan
How I tested it:
- Before: Run a long query in a loop and hit ctrl-c. Observe the
traceback containing `PineconeGrpcFuture()`
- After: Run a long query in a loop and hit ctrl-c. Observe the
traceback containing your `.result()` call instead.
0 commit comments