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

Table transactional batch allows multiple partition keys in a batch #1215

Open
joelverhagen opened this issue Dec 13, 2021 · 6 comments
Open
Assignees
Labels
table-storage Relating to Azurite table storage implementation

Comments

@joelverhagen
Copy link
Contributor

Which service(blob, file, queue, table) does this issue concern?

table

Which version of the Azurite was used?

3.15.0

Where do you get Azurite? (npm, DockerHub, NuGet, Visual Studio Code Extension)

VS Code

What's the Node.js version?

16.13.0

What problem was encountered?

A table transactional batch should only contain operations on a single partition key.
https://docs.microsoft.com/en-us/rest/api/storageservices/performing-entity-group-transactions#requirements-for-entity-group-transactions

All entities subject to operations as part of the transaction must have the same PartitionKey value.

This fails properly on Azure and legacy emulator.

Steps to reproduce the issue?

using Azure.Data.Tables;

var tableClient = new TableServiceClient("UseDevelopmentStorage=true");
var table = tableClient.GetTableClient("table0");
table.Delete();
table.Create();
try
{
    table.SubmitTransaction(new[]
    {
        new TableTransactionAction(TableTransactionActionType.Add, new TableEntity("PK1", "RK1")),
        new TableTransactionAction(TableTransactionActionType.Add, new TableEntity("PK2", "RK2")),
        new TableTransactionAction(TableTransactionActionType.Add, new TableEntity("PK3", "RK3")),
    });
}
catch (Exception ex)
{
    Console.WriteLine($"Exception {ex.GetType().Name}: {ex.Message.Split('\n', StringSplitOptions.TrimEntries)[0]}");
}
Console.WriteLine("Entity count: " + table.Query<TableEntity>().Count());
2021-12-13T18:47:15.963Z 	 info: Azurite Table service is starting on 127.0.0.1:10002
2021-12-13T18:47:15.965Z 	 info: AccountDataStore:init() Refresh accounts from environment variable AZURITE_ACCOUNTS with value undefined
2021-12-13T18:47:15.965Z 	 info: AccountDataStore:init() Fallback to default emulator account devstoreaccount1.
2021-12-13T18:47:16.004Z 	 info: Azurite Table service successfully listens on http://127.0.0.1:10002
2021-12-13T18:47:19.958Z d3ff5b4e-ed3d-44ff-ac7b-fac9e8503942 info: TableStorageContextMiddleware: RequestMethod=DELETE RequestURL=http://127.0.0.1/devstoreaccount1/Tables('table0') RequestHeaders:{"host":"127.0.0.1:10002","x-ms-version":"2019-02-02","accept":"application/json","x-ms-client-request-id":"8f5b58d1-c484-4bac-b118-cd4631148954","x-ms-return-client-request-id":"true","user-agent":"azsdk-net-Data.Tables/12.3.0 (.NET 6.0.0-rtm.21522.10; Microsoft Windows 10.0.22000)","x-ms-date":"Mon, 13 Dec 2021 18:47:19 GMT","authorization":"SharedKeyLite devstoreaccount1:oKvPvg7GPSA0d8n77WYThGFuCYUk6OmDrfWq18iU+0U="} ClientIP=127.0.0.1 Protocol=http HTTPVersion=1.1
2021-12-13T18:47:19.958Z d3ff5b4e-ed3d-44ff-ac7b-fac9e8503942 debug: tableStorageContextMiddleware: Dispatch pattern string: /Tables('table0')
2021-12-13T18:47:19.959Z d3ff5b4e-ed3d-44ff-ac7b-fac9e8503942 info: tableStorageContextMiddleware: Account=devstoreaccount1 tableName=table0
2021-12-13T18:47:19.960Z d3ff5b4e-ed3d-44ff-ac7b-fac9e8503942 verbose: DispatchMiddleware: Dispatching request...
2021-12-13T18:47:19.961Z d3ff5b4e-ed3d-44ff-ac7b-fac9e8503942 info: DispatchMiddleware: Operation=Table_Delete
2021-12-13T18:47:19.962Z d3ff5b4e-ed3d-44ff-ac7b-fac9e8503942 verbose: AuthenticationMiddlewareFactory:createAuthenticationMiddleware() Validating authentications.
2021-12-13T18:47:19.962Z d3ff5b4e-ed3d-44ff-ac7b-fac9e8503942 info: TableSharedKeyLiteAuthenticator:validate() Start validation against account shared key authentication.
2021-12-13T18:47:19.963Z d3ff5b4e-ed3d-44ff-ac7b-fac9e8503942 info: TableSharedKeyLiteAuthenticator:validate() [STRING TO SIGN]:"Mon, 13 Dec 2021 18:47:19 GMT\n/devstoreaccount1/devstoreaccount1/Tables('table0')"
2021-12-13T18:47:19.964Z d3ff5b4e-ed3d-44ff-ac7b-fac9e8503942 info: TableSharedKeyLiteAuthenticator:validate() Calculated authentication header based on key1: SharedKeyLite devstoreaccount1:oKvPvg7GPSA0d8n77WYThGFuCYUk6OmDrfWq18iU+0U=
2021-12-13T18:47:19.964Z d3ff5b4e-ed3d-44ff-ac7b-fac9e8503942 info: TableSharedKeyLiteAuthenticator:validate() Signature 1 matched.
2021-12-13T18:47:19.966Z d3ff5b4e-ed3d-44ff-ac7b-fac9e8503942 verbose: DeserializerMiddleware: Start deserializing...
2021-12-13T18:47:19.968Z d3ff5b4e-ed3d-44ff-ac7b-fac9e8503942 info: HandlerMiddleware: DeserializedParameters={"version":"2019-02-02","options":{"requestId":"8f5b58d1-c484-4bac-b118-cd4631148954"}}
2021-12-13T18:47:19.971Z d3ff5b4e-ed3d-44ff-ac7b-fac9e8503942 error: ErrorMiddleware: Received a MiddlewareError, fill error information to HTTP response
2021-12-13T18:47:19.994Z d3ff5b4e-ed3d-44ff-ac7b-fac9e8503942 error: ErrorMiddleware: ErrorName=StorageError ErrorMessage="The specified resource does not exist."  ErrorHTTPStatusCode=404 ErrorHTTPStatusMessage=undefined ErrorHTTPHeaders={"x-ms-error-code":"ResourceNotFound","x-ms-request-id":"d3ff5b4e-ed3d-44ff-ac7b-fac9e8503942","x-ms-version":"2021-02-12"} ErrorHTTPBody="{\"odata.error\":{\"code\":\"ResourceNotFound\",\"message\":{\"lang\":\"en-US\",\"value\":\"The specified resource does not exist.\\nRequestId:d3ff5b4e-ed3d-44ff-ac7b-fac9e8503942\\nTime:2021-12-13T18:47:19.970Z\"}}}" ErrorStack="\"StorageError: The specified resource does not exist.\\n    at Function.ResourceNotFound (C:\\\\z\\\\Git\\\\joelverhagen\\\\Azurite\\\\src\\\\table\\\\errors\\\\StorageErrorFactory.ts:238:12)\\n    at LokiTableMetadataStore.deleteTable (C:\\\\z\\\\Git\\\\joelverhagen\\\\Azurite\\\\src\\\\table\\\\persistence\\\\LokiTableMetadataStore.ts:152:33)\\n    at TableHandler.delete (C:\\\\z\\\\Git\\\\joelverhagen\\\\Azurite\\\\src\\\\table\\\\handlers\\\\TableHandler.ts:109:30)\\n    at C:\\\\z\\\\Git\\\\joelverhagen\\\\Azurite\\\\src\\\\table\\\\generated\\\\middleware\\\\HandlerMiddlewareFactory.ts:82:10\\n    at C:\\\\z\\\\Git\\\\joelverhagen\\\\Azurite\\\\src\\\\table\\\\generated\\\\ExpressMiddlewareFactory.ts:97:57\\n    at Layer.handle [as handle_request] (C:\\\\z\\\\Git\\\\joelverhagen\\\\Azurite\\\\node_modules\\\\express\\\\lib\\\\router\\\\layer.js:95:5)\\n    at trim_prefix (C:\\\\z\\\\Git\\\\joelverhagen\\\\Azurite\\\\node_modules\\\\express\\\\lib\\\\router\\\\index.js:317:13)\\n    at C:\\\\z\\\\Git\\\\joelverhagen\\\\Azurite\\\\node_modules\\\\express\\\\lib\\\\router\\\\index.js:284:7\\n    at Function.process_params (C:\\\\z\\\\Git\\\\joelverhagen\\\\Azurite\\\\node_modules\\\\express\\\\lib\\\\router\\\\index.js:335:12)\\n    at next (C:\\\\z\\\\Git\\\\joelverhagen\\\\Azurite\\\\node_modules\\\\express\\\\lib\\\\router\\\\index.js:275:10)\""
2021-12-13T18:47:19.994Z d3ff5b4e-ed3d-44ff-ac7b-fac9e8503942 error: ErrorMiddleware: Set HTTP code: 404
2021-12-13T18:47:19.995Z d3ff5b4e-ed3d-44ff-ac7b-fac9e8503942 error: ErrorMiddleware: Set HTTP Header: x-ms-error-code=ResourceNotFound
2021-12-13T18:47:19.995Z d3ff5b4e-ed3d-44ff-ac7b-fac9e8503942 error: ErrorMiddleware: Set HTTP Header: x-ms-request-id=d3ff5b4e-ed3d-44ff-ac7b-fac9e8503942
2021-12-13T18:47:19.995Z d3ff5b4e-ed3d-44ff-ac7b-fac9e8503942 error: ErrorMiddleware: Set HTTP Header: x-ms-version=2021-02-12
2021-12-13T18:47:19.995Z d3ff5b4e-ed3d-44ff-ac7b-fac9e8503942 error: ErrorMiddleware: Set content type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8
2021-12-13T18:47:19.995Z d3ff5b4e-ed3d-44ff-ac7b-fac9e8503942 error: ErrorMiddleware: Set HTTP body: "{\"odata.error\":{\"code\":\"ResourceNotFound\",\"message\":{\"lang\":\"en-US\",\"value\":\"The specified resource does not exist.\\nRequestId:d3ff5b4e-ed3d-44ff-ac7b-fac9e8503942\\nTime:2021-12-13T18:47:19.970Z\"}}}"
2021-12-13T18:47:19.999Z d3ff5b4e-ed3d-44ff-ac7b-fac9e8503942 info: EndMiddleware: End response. TotalTimeInMS=41 StatusCode=404 StatusMessage=Not Found Headers={"server":"Azurite-Table/3.15.0","x-ms-error-code":"ResourceNotFound","x-ms-request-id":"d3ff5b4e-ed3d-44ff-ac7b-fac9e8503942","x-ms-version":"2021-02-12","content-type":"application/json;odata=minimalmetadata;streaming=true;charset=utf-8"}
2021-12-13T18:47:20.020Z 3a08f472-10af-4557-878f-66c16ef3599c info: TableStorageContextMiddleware: RequestMethod=POST RequestURL=http://127.0.0.1/devstoreaccount1/Tables?$format=application%2Fjson%3Bodata%3Dminimalmetadata RequestHeaders:{"host":"127.0.0.1:10002","x-ms-version":"2019-02-02","dataserviceversion":"3.0","accept":"application/json;odata=minimalmetadata","x-ms-client-request-id":"876876a7-afb3-4c81-8149-b95143cb5262","x-ms-return-client-request-id":"true","user-agent":"azsdk-net-Data.Tables/12.3.0 (.NET 6.0.0-rtm.21522.10; Microsoft Windows 10.0.22000)","x-ms-date":"Mon, 13 Dec 2021 18:47:20 GMT","authorization":"SharedKeyLite devstoreaccount1:ho79ksIuPb/9IvZ1yHYs4i5b5wOO4odOq7fzgppQZ0A=","content-type":"application/json;odata=nometadata","content-length":"22"} ClientIP=127.0.0.1 Protocol=http HTTPVersion=1.1
2021-12-13T18:47:20.020Z 3a08f472-10af-4557-878f-66c16ef3599c debug: tableStorageContextMiddleware: Dispatch pattern string: /Tables
2021-12-13T18:47:20.020Z 3a08f472-10af-4557-878f-66c16ef3599c info: tableStorageContextMiddleware: Account=devstoreaccount1 tableName=undefined
2021-12-13T18:47:20.020Z 3a08f472-10af-4557-878f-66c16ef3599c verbose: DispatchMiddleware: Dispatching request...
2021-12-13T18:47:20.021Z 3a08f472-10af-4557-878f-66c16ef3599c info: DispatchMiddleware: Operation=Table_Create
2021-12-13T18:47:20.021Z 3a08f472-10af-4557-878f-66c16ef3599c verbose: AuthenticationMiddlewareFactory:createAuthenticationMiddleware() Validating authentications.
2021-12-13T18:47:20.021Z 3a08f472-10af-4557-878f-66c16ef3599c info: TableSharedKeyLiteAuthenticator:validate() Start validation against account shared key authentication.
2021-12-13T18:47:20.021Z 3a08f472-10af-4557-878f-66c16ef3599c info: TableSharedKeyLiteAuthenticator:validate() [STRING TO SIGN]:"Mon, 13 Dec 2021 18:47:20 GMT\n/devstoreaccount1/devstoreaccount1/Tables"
2021-12-13T18:47:20.022Z 3a08f472-10af-4557-878f-66c16ef3599c info: TableSharedKeyLiteAuthenticator:validate() Calculated authentication header based on key1: SharedKeyLite devstoreaccount1:ho79ksIuPb/9IvZ1yHYs4i5b5wOO4odOq7fzgppQZ0A=
2021-12-13T18:47:20.022Z 3a08f472-10af-4557-878f-66c16ef3599c info: TableSharedKeyLiteAuthenticator:validate() Signature 1 matched.
2021-12-13T18:47:20.023Z 3a08f472-10af-4557-878f-66c16ef3599c verbose: DeserializerMiddleware: Start deserializing...
2021-12-13T18:47:20.024Z 3a08f472-10af-4557-878f-66c16ef3599c debug: deserialize(): Raw request body string is (removed all empty characters) {"TableName":"table0"}
2021-12-13T18:47:20.025Z 3a08f472-10af-4557-878f-66c16ef3599c info: HandlerMiddleware: DeserializedParameters={"options":{"queryOptions":{"format":"application/json;odata=minimalmetadata"},"requestId":"876876a7-afb3-4c81-8149-b95143cb5262","dataServiceVersion":"3.0"},"version":"2019-02-02","tableProperties":{"tableName":"table0"},"body":"ReadableStream"}
2021-12-13T18:47:20.027Z 3a08f472-10af-4557-878f-66c16ef3599c verbose: SerializerMiddleware: Start serializing...
2021-12-13T18:47:20.029Z 3a08f472-10af-4557-878f-66c16ef3599c debug: Serializer: Raw response body string is {"odata.metadata":"http://127.0.0.1:10002/devstoreaccount1/$metadata#Tables/@Element","TableName":"table0"}
2021-12-13T18:47:20.029Z 3a08f472-10af-4557-878f-66c16ef3599c info: Serializer: Start returning stream body.
2021-12-13T18:47:20.029Z 3a08f472-10af-4557-878f-66c16ef3599c info: EndMiddleware: End response. TotalTimeInMS=10 StatusCode=201 StatusMessage=Created Headers={"server":"Azurite-Table/3.15.0","content-type":"application/json;odata=minimalmetadata","x-ms-client-request-id":"876876a7-afb3-4c81-8149-b95143cb5262","x-ms-request-id":"3a08f472-10af-4557-878f-66c16ef3599c","x-ms-version":"2021-02-12","date":"Mon, 13 Dec 2021 18:47:20 GMT","preference-applied":"return-content"}
2021-12-13T18:47:20.073Z 3deb4125-6472-4ea2-b88b-f2b115deb7e5 info: TableStorageContextMiddleware: RequestMethod=POST RequestURL=http://127.0.0.1/devstoreaccount1/$batch RequestHeaders:{"host":"127.0.0.1:10002","x-ms-version":"2019-02-02","dataserviceversion":"3.0","accept":"application/json","x-ms-client-request-id":"d2043c86-c4cb-4a91-963b-6d244d7d2dd8","x-ms-return-client-request-id":"true","user-agent":"azsdk-net-Data.Tables/12.3.0 (.NET 6.0.0-rtm.21522.10; Microsoft Windows 10.0.22000)","x-ms-date":"Mon, 13 Dec 2021 18:47:20 GMT","authorization":"SharedKeyLite devstoreaccount1:abyOUKoR0/AcEHN2bbVkSkzsZeXNTe1q0hQAQXbo2yI=","content-type":"multipart/mixed; boundary=batch_b68ced96-cf05-4d40-a89f-2982c5d6fd8b","content-length":"1639"} ClientIP=127.0.0.1 Protocol=http HTTPVersion=1.1
2021-12-13T18:47:20.073Z 3deb4125-6472-4ea2-b88b-f2b115deb7e5 debug: tableStorageContextMiddleware: Dispatch pattern string: /$batch
2021-12-13T18:47:20.073Z 3deb4125-6472-4ea2-b88b-f2b115deb7e5 info: tableStorageContextMiddleware: Account=devstoreaccount1 tableName=$batch
2021-12-13T18:47:20.073Z 3deb4125-6472-4ea2-b88b-f2b115deb7e5 verbose: DispatchMiddleware: Dispatching request...
2021-12-13T18:47:20.073Z 3deb4125-6472-4ea2-b88b-f2b115deb7e5 info: DispatchMiddleware: Operation=Table_Batch
2021-12-13T18:47:20.073Z 3deb4125-6472-4ea2-b88b-f2b115deb7e5 verbose: AuthenticationMiddlewareFactory:createAuthenticationMiddleware() Validating authentications.
2021-12-13T18:47:20.073Z 3deb4125-6472-4ea2-b88b-f2b115deb7e5 info: TableSharedKeyLiteAuthenticator:validate() Start validation against account shared key authentication.
2021-12-13T18:47:20.074Z 3deb4125-6472-4ea2-b88b-f2b115deb7e5 info: TableSharedKeyLiteAuthenticator:validate() [STRING TO SIGN]:"Mon, 13 Dec 2021 18:47:20 GMT\n/devstoreaccount1/devstoreaccount1/$batch"
2021-12-13T18:47:20.074Z 3deb4125-6472-4ea2-b88b-f2b115deb7e5 info: TableSharedKeyLiteAuthenticator:validate() Calculated authentication header based on key1: SharedKeyLite devstoreaccount1:abyOUKoR0/AcEHN2bbVkSkzsZeXNTe1q0hQAQXbo2yI=
2021-12-13T18:47:20.074Z 3deb4125-6472-4ea2-b88b-f2b115deb7e5 info: TableSharedKeyLiteAuthenticator:validate() Signature 1 matched.
2021-12-13T18:47:20.074Z 3deb4125-6472-4ea2-b88b-f2b115deb7e5 verbose: DeserializerMiddleware: Start deserializing...
2021-12-13T18:47:20.075Z 3deb4125-6472-4ea2-b88b-f2b115deb7e5 info: HandlerMiddleware: DeserializedParameters={"version":"2019-02-02","options":{"requestId":"d2043c86-c4cb-4a91-963b-6d244d7d2dd8","dataServiceVersion":"3.0"},"multipartContentType":"multipart/mixed; boundary=batch_b68ced96-cf05-4d40-a89f-2982c5d6fd8b","contentLength":1639,"body":"ReadableStream"}
2021-12-13T18:47:20.076Z 3deb4125-6472-4ea2-b88b-f2b115deb7e5 debug: TableHandler:batch() Raw request string is "--batch_b68ced96-cf05-4d40-a89f-2982c5d6fd8b\r\nContent-Type: multipart/mixed; boundary=changeset_e5e2d642-3bd8-46d1-a457-8fa3eb51cf06\r\n\r\n--changeset_e5e2d642-3bd8-46d1-a457-8fa3eb51cf06\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nPOST http://127.0.0.1:10002/devstoreaccount1/table0?$format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nHost: 127.0.0.1\r\nx-ms-version: 2019-02-02\r\nDataServiceVersion: 3.0\r\nPrefer: return-no-content\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Type: application/json;odata=nometadata\r\n\r\n{\"PartitionKey\":\"PK1\",\"RowKey\":\"RK1\"}\r\n--changeset_e5e2d642-3bd8-46d1-a457-8fa3eb51cf06\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nPOST http://127.0.0.1:10002/devstoreaccount1/table0?$format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nHost: 127.0.0.1\r\nx-ms-version: 2019-02-02\r\nDataServiceVersion: 3.0\r\nPrefer: return-no-content\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Type: application/json;odata=nometadata\r\n\r\n{\"PartitionKey\":\"PK2\",\"RowKey\":\"RK2\"}\r\n--changeset_e5e2d642-3bd8-46d1-a457-8fa3eb51cf06\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nPOST http://127.0.0.1:10002/devstoreaccount1/table0?$format=application%2Fjson%3Bodata%3Dminimalmetadata HTTP/1.1\r\nHost: 127.0.0.1\r\nx-ms-version: 2019-02-02\r\nDataServiceVersion: 3.0\r\nPrefer: return-no-content\r\nAccept: application/json;odata=minimalmetadata\r\nContent-Type: application/json;odata=nometadata\r\n\r\n{\"PartitionKey\":\"PK3\",\"RowKey\":\"RK3\"}\r\n--changeset_e5e2d642-3bd8-46d1-a457-8fa3eb51cf06--\r\n\r\n--batch_b68ced96-cf05-4d40-a89f-2982c5d6fd8b--\r\n"
2021-12-13T18:47:20.083Z 3deb4125-6472-4ea2-b88b-f2b115deb7e5 debug: TableHandler:batch() Raw response string is "--batchresponse_b68ced96-cf05-4d40-a89f-2982c5d6fd8b\r\nContent-Type: multipart/mixed; boundary=changesetresponse_e5e2d642-3bd8-46d1-a457-8fa3eb51cf06\r\n\r\n--changesetresponse_e5e2d642-3bd8-46d1-a457-8fa3eb51cf06\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nDataServiceVersion: 3.0;\r\nLocation: http://127.0.0.1:10002/devstoreaccount1/table0?$format=application%2Fjson%3Bodata%3Dminimalmetadata(PartitionKey='PK1',RowKey='RK1')\r\nDataServiceId: http://127.0.0.1:10002/devstoreaccount1/table0?$format=application%2Fjson%3Bodata%3Dminimalmetadata(PartitionKey='PK1',RowKey='RK1')\r\nETag: W/\"datetime'2021-12-13T18%3A47%3A20.0730000Z'\"\r\n\r\n\r\n--changesetresponse_e5e2d642-3bd8-46d1-a457-8fa3eb51cf06\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nDataServiceVersion: 3.0;\r\nLocation: http://127.0.0.1:10002/devstoreaccount1/table0?$format=application%2Fjson%3Bodata%3Dminimalmetadata(PartitionKey='PK2',RowKey='RK2')\r\nDataServiceId: http://127.0.0.1:10002/devstoreaccount1/table0?$format=application%2Fjson%3Bodata%3Dminimalmetadata(PartitionKey='PK2',RowKey='RK2')\r\nETag: W/\"datetime'2021-12-13T18%3A47%3A20.0730000Z'\"\r\n\r\n\r\n--changesetresponse_e5e2d642-3bd8-46d1-a457-8fa3eb51cf06\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nDataServiceVersion: 3.0;\r\nLocation: http://127.0.0.1:10002/devstoreaccount1/table0?$format=application%2Fjson%3Bodata%3Dminimalmetadata(PartitionKey='PK3',RowKey='RK3')\r\nDataServiceId: http://127.0.0.1:10002/devstoreaccount1/table0?$format=application%2Fjson%3Bodata%3Dminimalmetadata(PartitionKey='PK3',RowKey='RK3')\r\nETag: W/\"datetime'2021-12-13T18%3A47%3A20.0730000Z'\"\r\n\r\n--changesetresponse_e5e2d642-3bd8-46d1-a457-8fa3eb51cf06--\r\n--batchresponse_b68ced96-cf05-4d40-a89f-2982c5d6fd8b--\r\n"
2021-12-13T18:47:20.083Z 3deb4125-6472-4ea2-b88b-f2b115deb7e5 verbose: SerializerMiddleware: Start serializing...
2021-12-13T18:47:20.084Z 3deb4125-6472-4ea2-b88b-f2b115deb7e5 info: Serializer: Start returning stream body.
2021-12-13T18:47:20.087Z 3deb4125-6472-4ea2-b88b-f2b115deb7e5 info: EndMiddleware: End response. TotalTimeInMS=14 StatusCode=202 StatusMessage=Accepted Headers={"server":"Azurite-Table/3.15.0","content-type":"multipart/mixed; boundary=batchresponse_b68ced96-cf05-4d40-a89f-2982c5d6fd8b","x-ms-request-id":"3deb4125-6472-4ea2-b88b-f2b115deb7e5","x-ms-version":"2021-02-12","date":"Mon, 13 Dec 2021 18:47:20 GMT"}
2021-12-13T18:47:20.129Z 344788d7-1233-4d72-a58a-b8ddfca2afd8 info: TableStorageContextMiddleware: RequestMethod=GET RequestURL=http://127.0.0.1/devstoreaccount1/table0()?$format=application%2Fjson%3Bodata%3Dminimalmetadata RequestHeaders:{"host":"127.0.0.1:10002","x-ms-version":"2019-02-02","dataserviceversion":"3.0","accept":"application/json;odata=minimalmetadata","x-ms-client-request-id":"8959bf30-12a7-4eaf-a24f-f8eefc272834","x-ms-return-client-request-id":"true","user-agent":"azsdk-net-Data.Tables/12.3.0 (.NET 6.0.0-rtm.21522.10; Microsoft Windows 10.0.22000)","x-ms-date":"Mon, 13 Dec 2021 18:47:20 GMT","authorization":"SharedKeyLite devstoreaccount1:u+ktgh9dWoymGflJpC7+uDd9Siai5KsBwRnakAAMXbk="} ClientIP=127.0.0.1 Protocol=http HTTPVersion=1.1
2021-12-13T18:47:20.129Z 344788d7-1233-4d72-a58a-b8ddfca2afd8 debug: tableStorageContextMiddleware: Dispatch pattern string: /table0()
2021-12-13T18:47:20.129Z 344788d7-1233-4d72-a58a-b8ddfca2afd8 info: tableStorageContextMiddleware: Account=devstoreaccount1 tableName=table0
2021-12-13T18:47:20.129Z 344788d7-1233-4d72-a58a-b8ddfca2afd8 verbose: DispatchMiddleware: Dispatching request...
2021-12-13T18:47:20.130Z 344788d7-1233-4d72-a58a-b8ddfca2afd8 info: DispatchMiddleware: Operation=Table_QueryEntities
2021-12-13T18:47:20.130Z 344788d7-1233-4d72-a58a-b8ddfca2afd8 verbose: AuthenticationMiddlewareFactory:createAuthenticationMiddleware() Validating authentications.
2021-12-13T18:47:20.130Z 344788d7-1233-4d72-a58a-b8ddfca2afd8 info: TableSharedKeyLiteAuthenticator:validate() Start validation against account shared key authentication.
2021-12-13T18:47:20.130Z 344788d7-1233-4d72-a58a-b8ddfca2afd8 info: TableSharedKeyLiteAuthenticator:validate() [STRING TO SIGN]:"Mon, 13 Dec 2021 18:47:20 GMT\n/devstoreaccount1/devstoreaccount1/table0()"
2021-12-13T18:47:20.130Z 344788d7-1233-4d72-a58a-b8ddfca2afd8 info: TableSharedKeyLiteAuthenticator:validate() Calculated authentication header based on key1: SharedKeyLite devstoreaccount1:u+ktgh9dWoymGflJpC7+uDd9Siai5KsBwRnakAAMXbk=
2021-12-13T18:47:20.130Z 344788d7-1233-4d72-a58a-b8ddfca2afd8 info: TableSharedKeyLiteAuthenticator:validate() Signature 1 matched.
2021-12-13T18:47:20.131Z 344788d7-1233-4d72-a58a-b8ddfca2afd8 verbose: DeserializerMiddleware: Start deserializing...
2021-12-13T18:47:20.131Z 344788d7-1233-4d72-a58a-b8ddfca2afd8 info: HandlerMiddleware: DeserializedParameters={"options":{"queryOptions":{"format":"application/json;odata=minimalmetadata"},"requestId":"8959bf30-12a7-4eaf-a24f-f8eefc272834","dataServiceVersion":"3.0"},"version":"2019-02-02"}
2021-12-13T18:47:20.134Z 344788d7-1233-4d72-a58a-b8ddfca2afd8 debug: TableHandler:queryEntities() Raw response string is "{\"odata.metadata\":\"http://127.0.0.1:10002/devstoreaccount1/$metadata#Tables/@Element\",\"value\":[{\"odata.etag\":\"W/\\\"datetime'2021-12-13T18%3A47%3A20.0730000Z'\\\"\",\"PartitionKey\":\"PK1\",\"RowKey\":\"RK1\",\"Timestamp@odata.type\":\"Edm.DateTime\",\"Timestamp\":\"2021-12-13T18:47:20.0730000Z\"},{\"odata.etag\":\"W/\\\"datetime'2021-12-13T18%3A47%3A20.0730000Z'\\\"\",\"PartitionKey\":\"PK2\",\"RowKey\":\"RK2\",\"Timestamp@odata.type\":\"Edm.DateTime\",\"Timestamp\":\"2021-12-13T18:47:20.0730000Z\"},{\"odata.etag\":\"W/\\\"datetime'2021-12-13T18%3A47%3A20.0730000Z'\\\"\",\"PartitionKey\":\"PK3\",\"RowKey\":\"RK3\",\"Timestamp@odata.type\":\"Edm.DateTime\",\"Timestamp\":\"2021-12-13T18:47:20.0730000Z\"}]}"
2021-12-13T18:47:20.134Z 344788d7-1233-4d72-a58a-b8ddfca2afd8 verbose: SerializerMiddleware: Start serializing...
2021-12-13T18:47:20.134Z 344788d7-1233-4d72-a58a-b8ddfca2afd8 info: Serializer: Start returning stream body.
2021-12-13T18:47:20.136Z 344788d7-1233-4d72-a58a-b8ddfca2afd8 info: EndMiddleware: End response. TotalTimeInMS=7 StatusCode=200 StatusMessage=OK Headers={"server":"Azurite-Table/3.15.0","content-type":"application/json;odata=minimalmetadata","x-ms-client-request-id":"8959bf30-12a7-4eaf-a24f-f8eefc272834","x-ms-request-id":"344788d7-1233-4d72-a58a-b8ddfca2afd8","x-ms-version":"2021-02-12","date":"Mon, 13 Dec 2021 18:47:20 GMT"}

Have you found a mitigation/solution?

Verify on the client side.

@edwin-huber edwin-huber self-assigned this Dec 14, 2021
@edwin-huber edwin-huber added the table-storage Relating to Azurite table storage implementation label Dec 14, 2021
@edwin-huber edwin-huber added this to the GA - Azurite V3 Table milestone Dec 14, 2021
@edwin-huber
Copy link
Collaborator

This is pending the merge of #1157
I can then add additional error handling logic.
#XiaoningLiu FYI

@stale
Copy link

stale bot commented Apr 16, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Apr 16, 2022
@edwin-huber
Copy link
Collaborator

bump

@stale stale bot removed the stale label Apr 27, 2022
@fhtino
Copy link

fhtino commented Sep 12, 2022

Any ETA on this?

@edwin-huber
Copy link
Collaborator

No firm ETA, I have time allocated next week to finish a number of work items, which could include this if I finish the other higher priority issues quickly.

@kentis
Copy link

kentis commented Jan 4, 2024

I would be happy to have a go at fixing this issue as it I also used quite some time figuring out why production would not accept my batches when my tests worked fine :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
table-storage Relating to Azurite table storage implementation
Projects
None yet
Development

No branches or pull requests

4 participants