Skip to content

GH-3461: Avoid unnecessary debug logging overhead in record write hot path#3462

Open
arouel wants to merge 1 commit intoapache:masterfrom
arouel:avoid-long-boxing-on-write
Open

GH-3461: Avoid unnecessary debug logging overhead in record write hot path#3462
arouel wants to merge 1 commit intoapache:masterfrom
arouel:avoid-long-boxing-on-write

Conversation

@arouel
Copy link
Copy Markdown

@arouel arouel commented Apr 2, 2026

Rationale for this change

InternalParquetRecordWriter.checkBlockSizeReached runs in a hot path, and we observed unnecessary overhead from debug log argument handling when debug logging is disabled. At high throughput (millions of records), this avoidable work can accumulate and impact write efficiency.

What changes are included in this PR?

This PR adds LOG.isDebugEnabled() guards around debug log statements in InternalParquetRecordWriter.checkBlockSizeReached.

Are these changes tested?

No new tests were added because the change is non-functional and limited to logging guards. Existing writer tests continue to cover the affected code paths functionally, and behavior is expected to remain unchanged.

Are there any user-facing changes?

There are no user-facing behavior changes. The expected impact is reduced internal overhead in high-volume write scenarios when debug logging is not enabled.

Closes #3461

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.

Avoid unnecessary debug logging overhead in record write hot path

2 participants