Skip to content

[Bug] Avoid altering lake catalog for tables that never enabled datalake#3302

Open
MaheshS08 wants to merge 3 commits into
apache:mainfrom
MaheshS08:bug_3297
Open

[Bug] Avoid altering lake catalog for tables that never enabled datalake#3302
MaheshS08 wants to merge 3 commits into
apache:mainfrom
MaheshS08:bug_3297

Conversation

@MaheshS08
Copy link
Copy Markdown
Contributor

Purpose

Linked issue: close #3297

The preAlterTableProperties method was calling lakeCatalog.alterTable()
for every table alter operation whenever a lake catalog was configured at the
cluster level, even for plain Fluss tables that never had table.datalake.enabled
set. This resulted in unnecessary calls to the lake catalog, which would throw
TableNotExistException (silently swallowed) for tables unknown to the lake catalog.

Brief change log

  • In MetadataManager#preAlterTableProperties, tightened the guard condition
    from if (lakeCatalog != null) to also check that the current table descriptor
    contains the table.datalake.enabled key (regardless of its value).
  • This ensures lakeCatalog.alterTable() is only called for tables that have
    ever opted into datalake, while preserving the existing sync behavior for
    tables that were previously lake-enabled and later disabled.

Tests

  • No Tests required

API and Format

No API or storage format changes. This is a behavioral fix in the coordinator's
metadata management logic only.

Documentation

No new feature introduced. No documentation changes required.

@MaheshS08
Copy link
Copy Markdown
Contributor Author

@luoyuxia , could you please review this PR?

@luoyuxia
Copy link
Copy Markdown
Contributor

@luoyuxia , could you please review this PR?

But ci fails

@Prajwal-banakar
Copy link
Copy Markdown
Contributor

Hi @MaheshS08 Looks like the CI failure is from Spotless formatting. You may have missed running mvn spotless:apply before pushing the changes.

Also, please go through the contributing guidelines once most of these checks are covered there and it helps avoid CI failures

@MaheshS08
Copy link
Copy Markdown
Contributor Author

@Prajwal-banakar thanks for the head's up. I have re-pushed to the branch with necessary changes.

@luoyuxia , please have a look at this PR, now the checks have been passed.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Avoid altering lake catalog for tables that never enabled datalake

3 participants