You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2022/04/21 12:36:33 UTC

[skywalking] branch queue updated: [Critical] Fix the priority mechanism of DataCarrier's MultipleChannelsConsumer failure.

This is an automated email from the ASF dual-hosted git repository.

wusheng pushed a commit to branch queue
in repository https://gitbox.apache.org/repos/asf/skywalking.git


The following commit(s) were added to refs/heads/queue by this push:
     new 6802c060cb [Critical] Fix the priority mechanism of DataCarrier's MultipleChannelsConsumer failure.
6802c060cb is described below

commit 6802c060cb55b7c90c17fb9c940bf1e1e51fe4e9
Author: Wu Sheng <wu...@foxmail.com>
AuthorDate: Thu Apr 21 20:36:16 2022 +0800

    [Critical] Fix the priority mechanism of DataCarrier's MultipleChannelsConsumer failure.
---
 docs/en/changes/changes.md                                        | 7 +++++--
 .../oap/server/library/datacarrier/buffer/Channels.java           | 4 ++--
 .../library/datacarrier/consumer/MultipleChannelsConsumer.java    | 8 ++++++--
 3 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/docs/en/changes/changes.md b/docs/en/changes/changes.md
index 0a5e3f6387..938c50c60b 100644
--- a/docs/en/changes/changes.md
+++ b/docs/en/changes/changes.md
@@ -6,6 +6,9 @@
 
 #### OAP Server
 
+* [Critical] Fix the priority mechanism of DataCarrier's MultipleChannelsConsumer failure. This critical bug could stop
+  message consuming if the data are pushed into queue in small pieces but continuously.
+  (Notice, this could cause gRPC/HTTP thread pool blocking, and start rejecting telemetry data reporting.)
 * Add component definition(ID=127) for `Apache ShenYu (incubating)`.
 * Fix Zipkin receiver: Decode spans error, missing `Layer` for V9 and wrong time bucket for generate Service and
   Endpoint.
@@ -13,8 +16,8 @@
 * Support BanyanDB global index for entities. Log and Segment record entities declare this new feature.
 * Remove unnecessary analyzer settings in columns of templates. Many were added due to analyzer's default value.
 * Simplify the Kafka Fetch configuration in cluster mode.
-* [Breaking Change] Update the eBPF Profiling task to the service level,
-  please delete index/table: `ebpf_profiling_task`, `process_traffic`.
+* [Breaking Change] Update the eBPF Profiling task to the service level, please delete
+  index/table: `ebpf_profiling_task`, `process_traffic`.
 * Fix event can't split service ID into 2 parts.
 * Fix OAP Self-Observability metric `GC Time` calculation.
 * Set `SW_QUERY_MAX_QUERY_COMPLEXITY` default value to `1000`
diff --git a/oap-server/server-library/library-datacarrier-queue/src/main/java/org/apache/skywalking/oap/server/library/datacarrier/buffer/Channels.java b/oap-server/server-library/library-datacarrier-queue/src/main/java/org/apache/skywalking/oap/server/library/datacarrier/buffer/Channels.java
index a013a22413..9f601a0f83 100644
--- a/oap-server/server-library/library-datacarrier-queue/src/main/java/org/apache/skywalking/oap/server/library/datacarrier/buffer/Channels.java
+++ b/oap-server/server-library/library-datacarrier-queue/src/main/java/org/apache/skywalking/oap/server/library/datacarrier/buffer/Channels.java
@@ -77,14 +77,14 @@ public class Channels<T> {
     }
 
     /**
-     * get channelSize
+     * @return the number of channels
      */
     public int getChannelSize() {
         return this.bufferChannels.length;
     }
 
     /**
-     * @return the whole size of channels.
+     * @return the whole size of slots in the whole channels.
      */
     public long size() {
         return size;
diff --git a/oap-server/server-library/library-datacarrier-queue/src/main/java/org/apache/skywalking/oap/server/library/datacarrier/consumer/MultipleChannelsConsumer.java b/oap-server/server-library/library-datacarrier-queue/src/main/java/org/apache/skywalking/oap/server/library/datacarrier/consumer/MultipleChannelsConsumer.java
index a743ac59ae..3b4b506457 100644
--- a/oap-server/server-library/library-datacarrier-queue/src/main/java/org/apache/skywalking/oap/server/library/datacarrier/consumer/MultipleChannelsConsumer.java
+++ b/oap-server/server-library/library-datacarrier-queue/src/main/java/org/apache/skywalking/oap/server/library/datacarrier/consumer/MultipleChannelsConsumer.java
@@ -135,7 +135,9 @@ public class MultipleChannelsConsumer extends Thread {
          */
         private boolean consume(List consumeList) {
             try {
-                log.debug("consumer {}, priority {}", consumer.getClass().getName(), priority);
+                if (log.isTraceEnabled()) {
+                    log.trace("consumer {}, priority {}", consumer.getClass().getName(), priority);
+                }
                 if (priority < 50) {
                     priority += 10;
                     return false;
@@ -172,7 +174,9 @@ public class MultipleChannelsConsumer extends Thread {
                 consumer.nothingToConsume();
                 return false;
             } finally {
-                log.debug("consumer {}, new priority {}", consumer.getClass().getName(), priority);
+                if (log.isTraceEnabled()) {
+                    log.trace("consumer {}, new priority {}", consumer.getClass().getName(), priority);
+                }
                 consumer.onExit();
             }
         }