You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My SensitiveEncoder masks some data published to file and sends messages to kafka at the stage of encoding (that's for audit purposes).
When kafka fails it logs the error. As everything goes to ASYNC_FILE appender , the message goes to ArrayBlockingQueue in AsyncAppender.
If the log pressure is quite big, then queue is full and no new message can be added to it. Here we come to deadlock.
Inspecting the code i found that AsyncAppender doesn't consider thread calling 'append' method. I do not expect errors happened on Worker thread to be delayed and added to the queue again.
My suggestion is next:
in private void put(E eventObject) add check:
if (Thread.currentThread() == worker) then aai.appendLoopOnAppenders(e);
The text was updated successfully, but these errors were encountered:
ruzovvo
changed the title
AsyncAppender should avoid adding items to queue when log event happens in Worker thread #672
AsyncAppender should avoid adding items to queue when log event happens in Worker thread
Mar 13, 2024
Hi,
i have the next configuration:
My SensitiveEncoder masks some data published to file and sends messages to kafka at the stage of encoding (that's for audit purposes).
When kafka fails it logs the error. As everything goes to ASYNC_FILE appender , the message goes to ArrayBlockingQueue in AsyncAppender.
If the log pressure is quite big, then queue is full and no new message can be added to it. Here we come to deadlock.
Inspecting the code i found that AsyncAppender doesn't consider thread calling 'append' method. I do not expect errors happened on Worker thread to be delayed and added to the queue again.
My suggestion is next:
in
private void put(E eventObject)
add check:The text was updated successfully, but these errors were encountered: