Skip to content

Use VIEW_IDENTIFIER log key on view identifier mismatch (follow-up to #5093) - #5224

Merged
adutra merged 2 commits into
apache:mainfrom
ZephyrYWZhou:fix-view-identifier-logkey
Aug 4, 2026
Merged

adutra merged 2 commits into
apache:mainfrom
ZephyrYWZhou:fix-view-identifier-logkey

Conversation

@ZephyrYWZhou

@ZephyrYWZhou ZephyrYWZhou commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #5093.

In LocalIcebergCatalog.doRefresh(), the view-path call site (PolarisEntitySubType.ICEBERG_VIEW, log message "Stored view identifier mismatches requested identifier") used the generic StructuredLogKeys.IDENTIFIER. During review of #5093, @adutra and I agreed the more semantically correct constant here is StructuredLogKeys.VIEW_IDENTIFIER (see the review thread), consistent with:

  • the matching table path a few hundred lines above, which uses TABLE_IDENTIFIER, and
  • the EventAttributes.VIEW_IDENTIFIER tag applied to the same value just below this call site.

The change was agreed but not committed before #5093 merged; this PR applies it.

Changes

  • LocalIcebergCatalog.java: StructuredLogKeys.IDENTIFIER -> StructuredLogKeys.VIEW_IDENTIFIER at the view identifier mismatch log call.

Testing

No behavioral change beyond the emitted structured-log key name (identifier -> viewIdentifier). Compiles and passes Spotless.

Checklist

Follow-up to apache#5093. The view-path call site in LocalIcebergCatalog.doRefresh() (PolarisEntitySubType.ICEBERG_VIEW, "Stored view identifier mismatches requested identifier") used the generic StructuredLogKeys.IDENTIFIER. Per review discussion on apache#5093, switch it to the more semantically correct StructuredLogKeys.VIEW_IDENTIFIER, consistent with the matching table path (TABLE_IDENTIFIER) and the EventAttributes.VIEW_IDENTIFIER tag used just below.

No behavior change beyond the emitted structured-log key name (identifier -> viewIdentifier).
adutra
adutra previously approved these changes Aug 3, 2026
@github-project-automation github-project-automation Bot moved this from PRs In Progress to Ready to merge in Basic Kanban Board Aug 3, 2026
flyrain
flyrain previously approved these changes Aug 3, 2026
.atError()
.addKeyValue("entity.getTableIdentifier()", entity.getTableIdentifier())
.addKeyValue(StructuredLogKeys.IDENTIFIER, identifier)
.addKeyValue(StructuredLogKeys.VIEW_IDENTIFIER, identifier)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit, and only worth raising because this was the last user: StructuredLogKeys.IDENTIFIER (StructuredLogKeys.java:102) now has zero call sites anywhere in the repo. #5093 built that class by extracting keys that were actually in use, so a constant nobody references is slightly out of place with how the rest of it was assembled. Want to drop it here, or keep it as a reserved generic key?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, I'd drop it now.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch @flyrain! Let me drop it.

This PR moved the last call site of StructuredLogKeys.IDENTIFIER to VIEW_IDENTIFIER, leaving IDENTIFIER with zero references. apache#5093 built StructuredLogKeys by extracting keys actually in use, so remove the now-orphaned generic constant to stay consistent (per review from @flyrain / @adutra).
@ZephyrYWZhou
ZephyrYWZhou dismissed stale reviews from flyrain and adutra via f48d205 August 4, 2026 00:56
@ZephyrYWZhou

Copy link
Copy Markdown
Contributor Author

Could @flyrain or @adutra help merge this CR? It looks like I don't have merge permission yet.

By the way, is merge permission something that's configurable, or is it granted automatically after I have had a certain number of authored CRs merged?

@ZephyrYWZhou
ZephyrYWZhou requested a review from adutra August 4, 2026 01:58
@adutra
adutra merged commit 65d046a into apache:main Aug 4, 2026
25 checks passed
@github-project-automation github-project-automation Bot moved this from Ready to merge to Done in Basic Kanban Board Aug 4, 2026
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.

Introduce structured log key constants for SLF4J addKeyValue calls

3 participants