Commit 40363fc
committed
REST: treat HTTP 400 commit-validation failures as CommitFailedException
Some REST catalog implementations (e.g., Databricks Unity Catalog) return
HTTP 400 with a "commit validation failed" message for concurrent-write
conflicts instead of the spec-mandated HTTP 409. Because CommitErrorHandler
previously mapped all 400 responses to BadRequestException, these conflicts
escaped SnapshotProducer's retry-with-refresh loop entirely and propagated
as fatal errors.
Add a case 400 check in CommitErrorHandler that recognises the conflict
pattern and raises CommitFailedException instead, restoring normal
optimistic-concurrency retry behaviour for non-compliant catalogs. Responses
that do not match the pattern still fall through to the default 400 handler
and raise BadRequestException as before.1 parent 6976e02 commit 40363fc
1 file changed
Lines changed: 13 additions & 0 deletions
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
122 | 123 | | |
123 | 124 | | |
124 | 125 | | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
125 | 138 | | |
126 | 139 | | |
127 | 140 | | |
| |||
0 commit comments