Skip to content

Fix mismatched log field types more#13256

Open
masaori335 wants to merge 1 commit into
apache:masterfrom
masaori335:more-log-type-fix
Open

Fix mismatched log field types more#13256
masaori335 wants to merge 1 commit into
apache:masterfrom
masaori335:more-log-type-fix

Conversation

@masaori335

Copy link
Copy Markdown
Contributor

Following #13223. Four more LogFields are initialized with unmatched types with marshal/unmarshal function.

Seems we're easily make mistake with this, we need something to check it at compile time.

@masaori335 masaori335 added this to the 11.0.0 milestone Jun 11, 2026
@masaori335 masaori335 self-assigned this Jun 11, 2026
Copilot AI review requested due to automatic review settings June 11, 2026 01:50
@masaori335 masaori335 added the Bug label Jun 11, 2026

Copilot AI left a comment

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.

Pull request overview

This PR continues the logging field type cleanup from #13223 by correcting additional LogField type declarations in Log::init_fields() so they match the actual marshal/unmarshal behavior, improving correctness for type-driven consumers (e.g., filters/aggregates and binary log readers).

Changes:

  • Re-type client_ssl_cert_provided (cscert) and proxy_ssl_cert_provided (pscert) from STRING to sINT to match marshal_*_provided_cert() writing a single int.
  • Re-type next_hop_port (nhp) from IP to sINT to match marshal_next_hop_port() writing the port as an int.
  • Re-type proxy_protocol_authority (ppa) from IP to STRING to match marshal_proxy_protocol_authority() writing a string payload.

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

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants