ASF Bugzilla – Attachment 29839 Details for
Bug 54398
Improve AyncAppender's append performance
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Invoke Thread.isAlive() only when buffer is full.
54398.diff (text/plain), 804 bytes, created by
liangly
on 2013-01-10 05:08:14 UTC
(
hide
)
Description:
Invoke Thread.isAlive() only when buffer is full.
Filename:
MIME Type:
Creator:
liangly
Created:
2013-01-10 05:08:14 UTC
Size:
804 bytes
patch
obsolete
>Index: src/main/java/org/apache/log4j/AsyncAppender.java >=================================================================== >--- src/main/java/org/apache/log4j/AsyncAppender.java (revision 1227156) >+++ src/main/java/org/apache/log4j/AsyncAppender.java (working copy) >@@ -142,7 +142,7 @@ > // if dispatcher thread has died then > // append subsequent events synchronously > // See bug 23021 >- if ((dispatcher == null) || !dispatcher.isAlive() || (bufferSize <= 0)) { >+ if (bufferSize <= 0) { > synchronized (appenders) { > appenders.appendLoopOnAppenders(event); > } >@@ -177,6 +177,10 @@ > } > > break; >+ } else if (!dispatcher.isAlive()) { >+ buffer.clear(); >+ bufferSize = -1; >+ break; > } > > //
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 54398
: 29839