Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to Delete Records from CosmosDB #18734

Closed
6 tasks
harikapampatti opened this issue Nov 18, 2021 · 6 comments
Closed
6 tasks

Unable to Delete Records from CosmosDB #18734

harikapampatti opened this issue Nov 18, 2021 · 6 comments
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. Cosmos customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@harikapampatti
Copy link

harikapampatti commented Nov 18, 2021

  • Package Name:
  • Package Version:
  • Operating system:
  • nodejs
    • version:
  • browser
    • name/version:
  • typescript
    • version:
  • Is the bug related to documentation in

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:
1.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

Hi Team,

Iam using @azure/cosmosdb to perform bulk delete also iam handling thorttling but still it is not delteting the records.

Below is the code.

  operations.push({
                operationType: "Delete",
                id: superItem.id,
                partitionKey: superItem.partitionKey
            })
  if (i % 100 === 0 || i === 1) {
                try {                    
                    var response = await createdContainer.items.bulk(operations);                  
                     throttledCount = response.filter((r) => r.statusCode === 429).length;
                     while (throttledCount !== 0) {
                         response = await createdContainer.items.bulk(operations);
                                                throttledCount = response.filter((r) => r.statusCode === 429).length;
                     }
                     let successCount =response.filter((r) => r.statusCode === 201).length;
                } catch (error) {
                    console.log("Error Occured in Bulk Operation" + error);
                }

In the above code iam passing the id and partitionKey key to delete the records but if i push 100 records to operations every time its deleting 42 records only and skipping remaining records.

Could anyone please help me to resolve the issue

@ghost ghost added needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Nov 18, 2021
@ramya-rao-a ramya-rao-a added Client This issue points to a problem in the data-plane of the library. Cosmos labels Nov 18, 2021
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Nov 18, 2021
@harikapampatti
Copy link
Author

May i know the status on this?

@sajeetharan
Copy link
Member

@harikapampatti Thanks for reporting the issue, We are investigating it now and will update you soon!

@harikapampatti
Copy link
Author

@sajeetharan - Any update on this issue?

@sajeetharan
Copy link
Member

@harikapampatti We are trying to replicate the Issue, can you provide more details in order to replicate this on our side. While we are looking at it, can you also try to delete the items sequentially without doing an iteration?

@JericHunter
Copy link

Hey @harikapampatti just reaching out again to ask if you were able to delete the items the way sajeetharan suggested? Can you also provide more details so that we can reproduce the issue and work on a fix, thank you in advance.

azure-sdk pushed a commit to azure-sdk/azure-sdk-for-js that referenced this issue Apr 27, 2022
DataBox API version upgrade to 2022-02-01 (Azure#18734)

* Change operationIds and descriptions for doc generation

* Initial commit - copy files from previous version

* Changes for v2022-02-01

* Remove unnecessary changes

* Revert minor change

* Update readme.python.md

`readme.python` has used track2 by default, so it no longer needs `track2` tag.

Co-authored-by: Jiefeng Chen <51037443+BigCat20196@users.noreply.github.com>
@jay-most
Copy link
Contributor

jay-most commented Jun 7, 2022

@harikapampatti please reopen if needed. Issue stale.

@jay-most jay-most closed this as completed Jun 7, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Apr 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Client This issue points to a problem in the data-plane of the library. Cosmos customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

7 participants