-
Notifications
You must be signed in to change notification settings - Fork 312
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 service batch does not roll back update actions (merge and delete are fine) #1228
Comments
The fix appears to be: diff --git a/src/table/persistence/LokiTableMetadataStore.ts b/src/table/persistence/LokiTableMetadataStore.ts
index 1514628..b5d8543 100644
--- a/src/table/persistence/LokiTableMetadataStore.ts
+++ b/src/table/persistence/LokiTableMetadataStore.ts
@@ -676,6 +676,9 @@ export default class LokiTableMetadataStore implements ITableMetadataStore {
if (!doc) {
throw StorageErrorFactory.getEntityNotFound(context);
}
+ if (batchID) {
+ this.transactionRollbackTheseEntities.push(doc);
+ }
// Test if etag value is valid
const encodedEtag = doc.eTag.replace(":", "%3A").replace(":", "%3A"); |
23 tasks
Thanks for catching this. |
edwin-huber
added a commit
to edwin-huber/Azurite
that referenced
this issue
Jan 12, 2022
edwin-huber
added a commit
to edwin-huber/Azurite
that referenced
this issue
Jan 12, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Which service(blob, file, queue, table) does this issue concern?
table
Which version of the Azurite was used?
Locally running version of #1157
Where do you get Azurite? (npm, DockerHub, NuGet, Visual Studio Code Extension)
Git clone
What's the Node.js version?
16.13.0
What problem was encountered?
When a batch transaction with an update action (e.g. update-replace not update-merge) fails, the update action is not rolled back. We are missing a bit of book keeping. I have a local patch that fixes the problem.
Steps to reproduce the issue?
Please be sure to remove any PII or sensitive information before sharing!
The debug log will log raw request headers and bodies, so that we can replay these against Azurite using REST and create tests to validate resolution.
Have you found a mitigation/solution?
The text was updated successfully, but these errors were encountered: