PushItemsAsync bug ?
See original GitHub issueDiscussed in https://github.com/Azure/azure-mobile-apps/discussions/570
<div type='discussions-op-text'>Originally posted by henda79 January 16, 2023 I have noticed an issue when trying to push a single table, but I’m not sure if its a bug or intended,
At the moment I have a single record in the _errors table for table A, now if I try to push table B I get an error which seems odd because the pushing of table B worked fine. It returns the error due to the previous error of table A now stored in the __errors table.
It is this code here in the PushItemsAsync method. It just gets all records from the __errors table and reports the problem.
Surely it should just get errors from the table I am trying to push ?
List<TableOperationError> errors = new();
PushStatus batchStatus = batch.AbortReason ?? PushStatus.Complete;
try
{
errors.AddRange(await batch.LoadErrorsAsync(cancellationToken).ConfigureAwait(false));
}
catch (Exception ex)
{
batch.OtherErrors.Add(new OfflineStoreException("Failed to read errors from the local store.", ex));
}
SendPushFinishedEvent(batchStatus != PushStatus.Complete);
// If the push did not complete successfully, then throw a PushFailedException.
if (batchStatus != PushStatus.Complete || batch.HasErrors(errors))
{
List<TableOperationError> unhandledErrors = errors.Where(error => !error.Handled).ToList();
Exception innerException = batch.OtherErrors.Count > 0 ? new AggregateException(batch.OtherErrors) : null;
throw new PushFailedException(new PushCompletionResult(unhandledErrors, batchStatus), innerException);
}
```</div>
Issue Analytics
- State:
- Created 8 months ago
- Comments:8 (7 by maintainers)
Top Results From Across the Web
NULL values are not updated when calling IOfflineTable. ...
Describe the bug When a field of an item is changed from any value to null, then this field is not updated on...
Read more >How to use the Azure Mobile Apps client library for .NET
This guide shows you how to perform common scenarios using the .NET client library for Azure Mobile Apps. Use the .NET client library...
Read more >Offline data sync for mobile apps - Azure
Offline data sync is an SDK feature of Azure Mobile Apps. Data is stored in a local store. When your app is offline,...
Read more >'There are still pending operations for table 'todo' after a ...
I am trying to create a MAUI app with offline data sync. I am getting the above error on Android emulator when calling...
Read more >1Password.exe - powered by Falcon Sandbox
String Context Stream UID
ingdirect.com Domain/IP reference 13e0cfbe5a7c87450b38cc2b69a927ca‑600117...
hasibeenpwned.com Domain/IP reference 13e0cfbe5a7c87450b38cc2b69a927ca‑600064...
google.com Domain/IP reference 13e0cfbe5a7c87450b38cc2b69a927ca‑600117...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve made two minimal changes in #581:
This should sort out the issues that were reported. If there are more conditions when errors cause problems, let me know via a new bug and I’ll fix the situation.
When i was using the SDK, I thought that methods like CancelAndDiscardItemAsync CancelAndUpdateItemAsync will also removed all relevant information, like pending queue item, errors, etc… In other side i think there should be always a way for remove all that includes all tables anda data, sthg like the final purge 😃