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);
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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:let's discuss.
Beta Was this translation helpful? Give feedback.
All reactions