Skip to content

[BUG] Log segment metadata value in convertSegmentMetadataToModel debug output#6886

Open
cuiweixie wants to merge 1 commit intochroma-core:mainfrom
cuiweixie:fix/segment-metadata-debug-log
Open

[BUG] Log segment metadata value in convertSegmentMetadataToModel debug output#6886
cuiweixie wants to merge 1 commit intochroma-core:mainfrom
cuiweixie:fix/segment-metadata-debug-log

Conversation

@cuiweixie
Copy link
Copy Markdown

What

Fixes the log.Debug call in convertSegmentMetadataToModel so it logs the resolved metadata instead of always logging nil.

Why

The previous code passed nil to zap.Any, so debug output did not reflect the converted segment metadata.

Fixes #6885

…ug output

The debug line passed nil to zap.Any instead of the resolved metadata,
so logs never showed the converted segment metadata.
@github-actions
Copy link
Copy Markdown

Reviewer Checklist

Please leverage this checklist to ensure your code review is thorough before approving

Testing, Bugs, Errors, Logs, Documentation

  • Can you think of any use case in which the code does not behave as intended? Have they been tested?
  • Can you think of any inputs or external events that could break the code? Is user input validated and safe? Have they been tested?
  • If appropriate, are there adequate property based tests?
  • If appropriate, are there adequate unit tests?
  • Should any logging, debugging, tracing information be added or removed?
  • Are error messages user-friendly?
  • Have all documentation changes needed been made?
  • Have all non-obvious changes been commented?

System Compatibility

  • Are there any potential impacts on other parts of the system or backward compatibility?
  • Does this change intersect with any items on our roadmap, and if so, is there a plan for fitting them together?

Quality

  • Is this code of a unexpectedly high quality (Readability, Modularity, Intuitiveness)

@propel-code-bot
Copy link
Copy Markdown
Contributor

Fix segment metadata debug logging in convertSegmentMetadataToModel

This PR makes a one-line bug fix in go/pkg/sysdb/coordinator/model_db_convert.go within convertSegmentMetadataToModel. The log.Debug call now passes the resolved metadata object to zap.Any("segmentMetadata", ...) instead of hardcoded nil.

Behavioral impact is limited to observability: debug logs now correctly reflect converted segment metadata (or nil only when metadata is actually empty). This aligns with the PR intent and issue #6885.

This summary was automatically generated by @propel-code-bot

Copy link
Copy Markdown
Contributor

@propel-code-bot propel-code-bot bot left a comment

Choose a reason for hiding this comment

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

Review found no issues; the one-line logging fix is correct and low risk.

Status: No Issues Found | Risk: Low

Review Details

📁 1 files reviewed | 💬 0 comments

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] convertSegmentMetadataToModel debug logs nil instead of metadata

1 participant