Repository navigation
Use VIEW_IDENTIFIER log key on view identifier mismatch (follow-up to #5093) - #5224
Merged
Merged
Conversation
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
previously approved these changes
Aug 3, 2026
flyrain
previously approved these changes
Aug 3, 2026
| .atError() | ||
| .addKeyValue("entity.getTableIdentifier()", entity.getTableIdentifier()) | ||
| .addKeyValue(StructuredLogKeys.IDENTIFIER, identifier) | ||
| .addKeyValue(StructuredLogKeys.VIEW_IDENTIFIER, identifier) |
Contributor
There was a problem hiding this comment.
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?
Contributor
There was a problem hiding this comment.
Good catch, I'd drop it now.
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).
flyrain
approved these changes
Aug 4, 2026
Contributor
Author
adutra
approved these changes
Aug 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 genericStructuredLogKeys.IDENTIFIER. During review of #5093, @adutra and I agreed the more semantically correct constant here isStructuredLogKeys.VIEW_IDENTIFIER(see the review thread), consistent with:TABLE_IDENTIFIER, andEventAttributes.VIEW_IDENTIFIERtag 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_IDENTIFIERat the view identifier mismatch log call.Testing
No behavioral change beyond the emitted structured-log key name (
identifier->viewIdentifier). Compiles and passes Spotless.Checklist
StructuredLogKeys