Entity not found on delete/replace

What would cause a table entity to be able to be queried from the table, then return a "not found" during a delete or replace operation immediately after?  The item is in the table and there's no double-delete going on.

I expose an API that ultimately loads data from a table using Azure Storage SDK 4.3.0.  There is a Windows 8.1 client that uses the data, and updates that data through the webapi.  The code is completely isolated and secured, and only the web server (also on azure) fetches or updates the table using c#.

A while back, I experienced one entity that could be queried from the table, but then could never be replaced or deleted via the 4.3.0 SDK.  The error was a 404 not found from the azure storage API (Both c# api and underlying HTTP indicated the same thing). I used the Azure Storage Explorer by Neudesic and searched for that specific entity, and with ASE I could edit, update and then delete the entity.  I was doing some work on the code, thought I did something wrong, noted the incident internally, then moved on.  (I didn't have time to dive in and inspect the HTTP request payloads, unfortunately)

Then, last week a client reported the same thing; one entity just wouldn't update or delete.   I had to go into ASE, copy the item to a new entity, and delete the old one. 

The table has approximately 500 ops per day and has been running since November.  These two are the only occurrences I know of. 

Some other notes:

  • PartitionKey or RowKey were never changed between the query and update/delete.
  • Etag was set to * to force the update.
  • The op wouldn't complete even if the data was all the same.

Code that updates:

public static ResultStatus Update(CloudTable context, ServiceItemEntity sPe)
        {
            if (string.IsNullOrEmpty(sPe.ETag))
                sPe.ETag = "*";

            TableOperation updateOperation = TableOperation.Replace(sPe);
            try
            {
                // THIS LINE THROWS A STORAGEEXCEPTION:
                context.Execute(updateOperation);
                return ResultStatus.Success;

            }
            catch (StorageException)
            {
                return ResultStatus.ErrorSaveFailed;
            }
        }
Any suggestions?  This is a pretty basic operation to fail - and super critical if it happens to occur on the wrong entity....
January 10th, 2015 5:32pm

Hi,

Thank you for posting in here.

We are looking into this and will get back to you at earliest. Your patience is greatly appreciated.

Regards,

Manu Rekhar


Free Windows Admin Tool Kit Click here and download it now
January 11th, 2015 2:16pm

This definitely seems strange! We will need to investigate this at our end further. Can you please email (lakasa at microsoft.com) the table entity name and the time frame.
March 5th, 2015 3:52pm

Thanks for the concern and address.

I was ready to go grab the entity that was failing, but I can't seem to find the one that failed, or it's not failing any more - I'm not sure.

I've been monitoring the table errors and there are a few popping up here and there.  ClientOtherError shows 26 errors on 56,329 different operations in the last 7 days.  That could be related to a lot of things though and isn't necessarily the exact problem I've been looking for.  For example - there may be a filter/query that is looking for something in the table that doesn't exist...  I'm not sure how every operation in the webapi will translate to the table stats.

I'll post what I find and email if I find something exhibiting the same issue.

Free Windows Admin Tool Kit Click here and download it now
March 12th, 2015 2:34pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics