Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

BulkUpdateAsync with SetUpdateOperation never updates all the items #50

Open
andremaree opened this issue May 24, 2019 · 4 comments
Open

Comments

@andremaree
Copy link

I have been testing BulkUpdateAsync() with 6225 updates in the list. It never updates all the items that it is supposed to, there are always 15-20 items that do not get updated. This issue is present in v1.5.1 and 2.3.0-preview:

List updateOperations = new List();
SetUpdateOperation nUpdate = new SetUpdateOperation("NValue", id.NValue);
updateOperations.Add(nUpdate);
updateItems.Add(new UpdateItem(id.id, id.PartitionKey, updateOperations));
}
BulkUpdateResponse bulkUpdateResponse = await bulkExecutor.BulkUpdateAsync(
updateItems: updateItems,
maxConcurrencyPerPartitionKeyRange: null,
maxInMemorySortingBatchSize: null,
cancellationToken: token);

@andremaree
Copy link
Author

This is happening when the RUs are low, with 5000 RUs it seems to update all that it should. But on 2000 RUs it constantly neglects to update 16 docs.

When this bug occurs the response states that all docs were updated but this is not the truth, some docs were not updated. The workaround for this will be to update a date and then the code will have to query again on the date to get the docs that were not updated and then to do the bulkUpdate again.

@countincognito
Copy link

I am having the same problem using 2.3.0-preview2.

The response comes back as having updated all the documents, but a quick sanity check reveals that not all were updated. Like @andremaree I am having to run the update twice just to have a reasonable chance of ensuring the update was successful.

What's strange is that the bulk import call doesn't seem to have this problem - as far as I can tell, that is always successful.

@andremaree
Copy link
Author

I am having the same problem using 2.3.0-preview2.

The response comes back as having updated all the documents, but a quick sanity check reveals that not all were updated. Like @andremaree I am having to run the update twice just to have a reasonable chance of ensuring the update was successful.

What's strange is that the bulk import call doesn't seem to have this problem - as far as I can tell, that is always successful.

I have seen this bug with insert as well, but it happens much less seldom than update.

@Joehannus
Copy link

Joehannus commented Sep 4, 2019

I had this issue too. And I had hoped that I might have found information about the items that were not updated in the FailedUpdates property of the UpdateResponse class. But unfortunately this property, which is described in the documentation, is not implemented in version 2.3.0-preview2.

See:

https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmosdb.bulkexecutor.bulkupdate.bulkupdateresponse.failedupdates?view=azure-dotnet#Microsoft_Azure_CosmosDB_BulkExecutor_BulkUpdate_BulkUpdateResponse_FailedUpdates

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants