pinecone-io / pinecone-python-client

The Pinecone Python client
https://www.pinecone.io/docs
Apache License 2.0
306 stars 80 forks source link

Support returning the number of deleted vectors after a delete operation #199

Open Tete-Xiao opened 1 year ago

Tete-Xiao commented 1 year ago

Is this your first time submitting a feature request?

Describe the feature

Delete operation returns the number of deleted vectors.

Describe alternatives you've considered

No response

Who will this benefit?

No response

Are you interested in contributing this feature?

No response

Anything else?

No response

daverigby commented 6 months ago

This is a reasonable request, and still something we are considering, but let me give come additional context why this isn't currently supported.

The issues is that the Pinecone index doesn't necessarily know at the time of processing the delete request how many vectors are actually going to be deleted, as mutations (including deletes) are handled by initially writing to a Write-Ahead-Log for durability, then the actual index is updated asynchronously - see https://docs.pinecone.io/reference/architecture/serverless-architecture#write-path for more details.

As such, to include an actual deleted record count in the DeleteResponse would require waiting (blocking) for the result of the deletion to be appleid all the way down to the index; adding significant latency to the delete operation.