You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2019/12/22 12:47:56 UTC

[GitHub] [skywalking] dmsolr commented on a change in pull request #4099: write file unwait

dmsolr commented on a change in pull request #4099: write file unwait
URL: https://github.com/apache/skywalking/pull/4099#discussion_r360703390
 
 

 ##########
 File path: apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/logging/core/FileWriter.java
 ##########
 @@ -212,15 +212,11 @@ private boolean prepareWriteStream() {
     }
 
     /**
-     * Write log to the queue. W/ performance trade off, set 2ms timeout for the log OP.
+     * Write log to the queue. W/ performance trade off.
      *
      * @param message to log
      */
     @Override public void write(String message) {
-        try {
-            logBuffer.offer(message, 2, TimeUnit.MILLISECONDS);
-        } catch (InterruptedException e) {
-            e.printStackTrace();
-        }
+        logBuffer.offer(message);
 
 Review comment:
   `queue.offer(element)` will insert when the queue has free space. If not free space, the element will be discarded and release the lock immediately.
   As you description, I think you say the operator is `queue.put(element)`.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services