apache/gravitino

[Improvement] createTable may return success even when Gravitino metadata persistence fails

Offen

#10.630 geöffnet am 01.04.2026

 (3 Kommentare) (0 Reaktionen) (1 zugewiesene Person)Java (887 Forks)auto 404
good first issueimprovement

Repository-Metriken

Stars
 (3.058 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 6T 6h) (148 gemergte PRs in 30 T)

Beschreibung

What would you like to be improved?

In TableOperationDispatcher.createTable(...), Gravitino first creates the table in the underlying catalog, then writes the TableEntity to the entity store.

If store.put(tableEntity, true) fails, the exception is logged but swallowed, and the method still returns success.

This can leave the external table created, even though Gravitino metadata was not persisted. Clients will receive a successful create-table response even though Gravitino is in an inconsistent state.

Location is TableOperationDispatcher.java (line 640)

How should we improve?

Do not swallow the store.put(...) failure. Propagate the exception so create-table fails instead of returning false success OR if best-effort behavior is intended, return an explicit partial-success/inconsistent-state result and add a test for this path.

Add/modify an existing unit test to check for this.

Contributor Guide