症状
scripts/run-jepsen-m5-local.sh 実行時 (PR #924/#925 マージ後)、dynamodb-append-multi-table-workload が全 worker txn で ResourceNotFoundException: table not found を返す。
再現条件
--shardRanges のみで明示的な ranges を指定し、デフォルト range [<empty>, +inf) がない multi-group cluster:
$BINARY \
--raftBootstrap \
--raftGroups "1=127.0.0.1:50051,2=127.0.0.1:50054" \
--shardRanges "<T1_KEY>:<T3_KEY>=1,<T3_KEY>:=2" \
...
直接 curl での再現 (workload を経由しない最小ケース)
1. CreateTable jepsen_append_t1 → 200 OK, "TableStatus":"ACTIVE"
2. DescribeTable jepsen_append_t1 → ResourceNotFoundException
3. PutItem → ResourceNotFoundException
4. GetItem → ResourceNotFoundException
5. ListTables → {"TableNames":[]} ← 空配列!
つまり CreateTable は成功 response を返すが、続く全 read で table が見えない。
根本原因の仮説 (未確定)
adapter/dynamodb.go:782-806 の createTable handler は d.coordinator.Dispatch(req) の戻り値 err が nil なら "ACTIVE" を返す。
makeCreateTableRequest の write set:
dynamoTableMetaKey(tableName) = !ddb|meta|table|<base64> → routing key !ddb|route|table|<base64> = T1_KEY → group 1
dynamoTableGenerationKey(tableName) = !ddb|meta|gen|<base64> → 同じ routing → group 1
両方とも group 1 に行く single-shard txn。 これが Dispatch 成功 (err=nil) を返している。
しかし、続く loadTableSchema (read path):
d.store.GetAt(dynamoTableMetaKey(tableName), ts) で同じ key を読む
ShardStore.GetAt → groupForKey → group 1 の store
- 同じ group なのに
ErrKeyNotFound 返却
ListTables も空 → commit が durable に store に反映されていない か route range 外として scan/get が除外している 可能性。
確認済み
- ✅
ListRoutes は正常な 2-group catalog を返す
- ✅
/tmp/elastickv-debug/n1/n1/group-{1,2}/fsm.db 両方のディレクトリは存在
- ❌ サーバログに CreateTable / dispatch / error trace は一切なし (INFO level の制約か)
推測される影響範囲
--shardRanges を非デフォルトで指定する全シナリオ
- 既存の single-group デフォルト routing (
run-jepsen-local.sh の 3-node 構成) は影響なし (デフォルト range [<empty>, +inf) あり)
関連 PR
次のステップ
調査が必要:
- CreateTable dispatch 後、実際に group 1 の pebble db に何が書かれたか確認 (pebble の low-level inspector が必要)
ShardStore.ScanAt の挙動が --shardRanges 内のキーのみ返すか (default-range 不在で scan boundaries が壊れる可能性)
- もしくは
loadTableSchema の snapshotTS 計算が新しい write を見えない TS を返している可能性
実装の方向性:
- (a)
parseShardRanges でデフォルト range を補完して --shardRanges 外の routing を可能にする
- (b) ShardStore 側で scan の boundary handling を修正
- (c) CreateTable dispatch の commit ack を待つように adapter を修正
症状
scripts/run-jepsen-m5-local.sh実行時 (PR #924/#925 マージ後)、dynamodb-append-multi-table-workloadが全 worker txn でResourceNotFoundException: table not foundを返す。再現条件
--shardRangesのみで明示的な ranges を指定し、デフォルト range[<empty>, +inf)がない multi-group cluster:直接 curl での再現 (workload を経由しない最小ケース)
つまり
CreateTableは成功 response を返すが、続く全 read で table が見えない。根本原因の仮説 (未確定)
adapter/dynamodb.go:782-806のcreateTablehandler はd.coordinator.Dispatch(req)の戻り値 err が nil なら "ACTIVE" を返す。makeCreateTableRequestの write set:dynamoTableMetaKey(tableName)=!ddb|meta|table|<base64>→ routing key!ddb|route|table|<base64>= T1_KEY → group 1dynamoTableGenerationKey(tableName)=!ddb|meta|gen|<base64>→ 同じ routing → group 1両方とも group 1 に行く single-shard txn。 これが Dispatch 成功 (err=nil) を返している。
しかし、続く
loadTableSchema(read path):d.store.GetAt(dynamoTableMetaKey(tableName), ts)で同じ key を読むShardStore.GetAt→groupForKey→ group 1 の storeErrKeyNotFound返却ListTablesも空 → commit が durable に store に反映されていない か route range 外として scan/get が除外している 可能性。確認済み
ListRoutesは正常な 2-group catalog を返す/tmp/elastickv-debug/n1/n1/group-{1,2}/fsm.db両方のディレクトリは存在推測される影響範囲
--shardRangesを非デフォルトで指定する全シナリオrun-jepsen-local.shの 3-node 構成) は影響なし (デフォルト range[<empty>, +inf)あり)関連 PR
--host 127.0.0.1fix (E2E 中に発見)次のステップ
調査が必要:
ShardStore.ScanAtの挙動が--shardRanges内のキーのみ返すか (default-range 不在で scan boundaries が壊れる可能性)loadTableSchemaのsnapshotTS計算が新しい write を見えない TS を返している可能性実装の方向性:
parseShardRangesでデフォルト range を補完して--shardRanges外の routing を可能にする