AzureCosmosDB / PartitionKeyDeleteFeedbackGroup

Private repo for the preview of the delete by partition key value feature in Cosmos DB.
3 stars 0 forks source link

Adding new documents to partition under deletion #1

Closed jkonecki closed 3 years ago

jkonecki commented 3 years ago

Just wanted to let the Team know that this is a brilliant feature!

It means that the deletion of a large partition is effectively instant.

Could you please confirm what would happen if a second delete request is sent?

An example: Document 1 added Document 2 added Partition deletion request 1 sent Document 2 added Document 3 added Partition deletion request 2 sent (request 1 is still ongoing)

Will the second request be rejected? Or would Docs 2 and 3 be scheduled for deletion?

deborahc commented 3 years ago

Hi @jkonecki, thanks for the feedback! Glad to hear the feature is useful.

In this scenario - when request 1 is sent, documents 1 and 2 are in its deletion scope (assuming the logical partition key matched the one specified in the delete request). After request 1 starts, the effect to the collection is as if document 1, 2 no longer exist.

So, when request 2 is sent, it will be accepted, and document 2 and 3 will be deleted as they are in the deletion scope (assuming logical partition key matched the one specified in the delete request).