apache / apache/iceberg-python

Possible read-after-write consistency issue with multiple schema migration steps in Iceberg tables on AWS Glue + S3

Offen
#2,599 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Python
Sterne
1.1k
Forks
581
Ø Merge
1 T. 17 Std.
Gemergte PRs (30 T.)
78

Beschreibung

### Apache Iceberg version

Pyiceberg 0.10.0
Pyiceberg-core 0.6.0

### Please describe the bug 🐞

This may be a hard one to pin down but I noticed that multiple schema migration steps executed sequentially in the same `update_schema` context *sometimes* result in Exceptions like column name not found when using Iceberg tables on AWS Glue. An example:

```python
with table.update_schema() as update:
update.rename_column("some_column", "renamed_column")
update.move_first("renamed_column") # this sometimes fails with an error
# that renamed column doesn't exist
```

I have not noticed it with other back-ends like SQLite, leading me to believe it is a Glue issue specifically where a write may not yet be reflected by the time of the next operation.

### Willingness to contribute

- [ ] I can contribute a fix for this bug independently
- [x] I would be willing to contribute a fix for this bug with guidance from the Iceberg community
- [ ] I cannot contribute a fix for this bug at this time

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Beginne mit dem Ablauf von table.update_schema() und reproduziere das Beispiel mit aufeinanderfolgendem rename_column gefolgt von move_first für AWS Glue und S3 und vergleiche es mit SQLite. Verfolge, ob der erste Schema-Schreibvorgang vor der nächsten Operation sichtbar ist. Als abgeschlossen gilt die Erklärung der Inkonsistenz sowie das Hinzufügen eines Regressionstests oder die eindeutige Dokumentation der verbleibenden Backend-Einschränkung.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
aws, python
Bereich
cloud, databases
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

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