adobe / adobe/S3-FileSystem

MetadataStore updateObject API fails occasionally with a conditional check error.

オープン
#6 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

bug
主要言語
Java
スター
8
フォーク
6
平均マージ
13時間 17分
マージ済み PR(30日)
2

説明

The core of the updateObject API implementation is here.

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.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

src/main/java/com/adobe/s3fs/metastore/internal/dynamodb/storage/AmazonDynamoDBStorage.java の updateObject 実装から始めます。大量のメタデータのみの操作中に、ConditionalCheck の失敗とクライアントの再試行がどのように処理されるかを追跡します。完了条件は、後続の DynamoDB 読み取りによって保存済みアイテムが要求された更新と一致することが示された場合にのみ、失敗した ConditionalCheck を抑制し、それ以外の場合はエラーが引き続き伝播されることです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
aws, java
領域
backend, database
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
明確に書かれている
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。