Skip to content

REST Catalog alterTable silently reports success when the server returns a non-table/column 404 #10267

Description

@LuciferYang

Search before asking

  • I searched in the issues and found no similar issues.

Paimon version

master (1.5-SNAPSHOT)

Compute Engine

Any engine using the REST Catalog.

Minimal reproduce step

  1. Use a REST catalog.
  2. Call alterTable(identifier, changes, ignoreIfNotExists = false) in a situation where the REST server answers with a 404 whose resource type is neither TABLE nor COLUMN, for example a DATABASE not-found because the table's database was concurrently dropped.

What doesn't meet your expectations?

alterTable returns normally and reports success even though the ALTER did not apply. The NoSuchResourceException handler only covers the TABLE and COLUMN resource types; for any other type it falls through the if/else-if chain and the method returns without error, so a failed alter is silently swallowed.

Anything else?

The sibling createBranch already rethrows in the analogous default branch of the same kind of dispatch. alterTable was the only one that let an unmapped 404 fall through to silent success.

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions