Skip to content

Merge 2.26.1 to 2.x#4169

Merged
ramanathan1504 merged 25 commits into
2.xfrom
2.26.1-to-2.x
Jul 2, 2026
Merged

Merge 2.26.1 to 2.x#4169
ramanathan1504 merged 25 commits into
2.xfrom
2.26.1-to-2.x

Conversation

@ramanathan1504

Copy link
Copy Markdown
Contributor

No description provided.

vy and others added 25 commits May 2, 2026 18:50
…4133)

* Fix circular reference detection for exceptions with colliding equals/hashCode implementations

* Add changelog entry for circular reference detection fix with colliding equals/hashCode exceptions

* Add changelog entry for circular reference detection fix with colliding equals/hashCode exceptions

* Add test for ThrowableProxy serialization with colliding equals/hashCode implementations

* Refactor ThrowableProxy serialization test to use modern Java I/O classes

* Use `TestFriendlyException` to exercise the malfunction

* Update changelog

* Improve comments

* Remove redundant change

---------

Co-authored-by: Volkan Yazıcı <volkan@yazi.ci>
Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
Co-authored-by: Ramanathan <ramanathanbscmca@gmail.com>
Co-authored-by: Piotr P. Karwasz <pkarwasz-github@apache.org>
Co-authored-by: Volkan Yazıcı <volkan@yazi.ci>
…ptor library (#4124)

Co-authored-by: Volkan Yazıcı <volkan@yazi.ci>
Co-authored-by: Piotr P. Karwasz <pkarwasz-github@apache.org>
Co-authored-by: Volkan Yazıcı <volkan@yazi.ci>
* Fix KafkaAppender reporting error after successful retry

When retryCount is configured and the initial tryAppend() fails, the
retry loop uses break to exit on success. However, break only exits the
while loop and execution always reaches the error() call afterward. This
causes spurious error notifications for transient Kafka failures that
were successfully recovered by a retry.

Replace break with return so that a successful retry exits append()
without reporting an error. Retry exceptions are now logged at DEBUG
level for diagnostics instead of being silently discarded.

Also remove dead code in Builder.getRetryCount() where Integer.valueOf(int)
was wrapped in a NumberFormatException catch that can never fire.

The bug was introduced in #315.

Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>

* Add changelog entry for KafkaAppender retry fix

Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>

* Use CloseableThreadContext in testRetrySuccessDoesNotReportError

Adopt reviewer suggestion to use try-with-resources CloseableThreadContext
instead of manual ThreadContext.put/clearMap.

---------

Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
@ramanathan1504 ramanathan1504 enabled auto-merge (squash) July 2, 2026 10:47
@ramanathan1504 ramanathan1504 merged commit 7f5459b into 2.x Jul 2, 2026
6 checks passed
@ramanathan1504 ramanathan1504 deleted the 2.26.1-to-2.x branch July 2, 2026 11:04
@github-project-automation github-project-automation Bot moved this from Approved to Merged in Log4j pull request tracker Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

4 participants