ramanathan1504 commented on PR #4319:
URL: https://github.com/apache/logging-log4j2/pull/4319#issuecomment-5909941769

   > Agreed: a failure in connectAndStart() must keep the pending batch because 
those events have not reached the database. I propose capping it at bufferSize 
by retrying a full batch before accepting another event; if that retry still 
fails, the write throws before adding the new event. This preserves the 
existing clear-on-commit-failure behavior. Does that overflow behavior match 
the intended policy? I have not pushed the local change because Maven stops at 
the enforcer: this checkout requires JDK [17,18), but the host has JDK 26.0.2.1.
   
   Let's keep this PR to the leak: clear in the outer finally, plus a one-time 
status-logger warning when a batch is discarded, like the 
writeWhileNotRunningLogged flag in #4246.
   Capping the buffer means deciding which event dies and probably a new 
attribute, so open a separate issue for it. Also drop the duplicate-rows 
wording: the connection runs with autoCommit false, so a failed commit rolls 
back and nothing lands.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to