adobe / adobe/S3-FileSystem

MetadataStore updateObject API fails occasionally with a conditional check error.

Offen
#6 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
bug
Vorherrschende Sprache
Java
Sterne
8
Forks
6
Ø Merge
13 Std. 17 Min.
Gemergte PRs (30 T.)
2

Beschreibung

The core of the updateObject API implementation is [here](https://github.com/adobe/S3-FileSystem/blob/main/src/main/java/com/adobe/s3fs/metastore/internal/dynamodb/storage/AmazonDynamoDBStorage.java#L83).

In some rare cases (mostly observed when running a very high number of metadata only operations against the file system: e.g. restoring an HBase snapshot into a directory) this method will fail with a ConditionalCheck.

What seems to be happening is that an I/O error occurs, on the server side in DynamoDB the operation completes successfully and the client retries the operation (since from its perspective it failed with an I/O error). At this point the operation fails because it is issued with a ConditionalCheck which is not idempotent.

The proposed solution is to handle this particular case: when we receive a ConditionalCheck failed error we should read the state of the item from DynamoDB and check it against the item state that was received as an update. If the two are equal that means the operation was in fact executed successfully in DynamoDB and we should not raise the error up the call stack.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne in src/main/java/com/adobe/s3fs/metastore/internal/dynamodb/storage/AmazonDynamoDBStorage.java bei der Implementierung von updateObject. Verfolge, wie ConditionalCheck-Fehler und Client-Wiederholungsversuche während Metadaten-only-Operationen mit hohem Volumen behandelt werden. Als abgeschlossen gilt die Aufgabe, wenn ein fehlgeschlagener ConditionalCheck nur dann unterdrückt wird, wenn ein anschließender DynamoDB-Lesevorgang zeigt, dass das gespeicherte Element mit dem angeforderten Update übereinstimmt; andernfalls wird der Fehler weiterhin weitergegeben.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
aws, java
Bereich
backend, database
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Klar beschrieben
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.