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 2020/08/02 15:59:56 UTC

[skywalking] branch export-increase created (now d391297)

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

wusheng pushed a change to branch export-increase
in repository https://gitbox.apache.org/repos/asf/skywalking.git.


      at d391297  Exporter INCREMENT mode is not working.

This branch includes the following new commits:

     new d391297  Exporter INCREMENT mode is not working.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[skywalking] 01/01: Exporter INCREMENT mode is not working.

Posted by wu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit d391297b14d95fc9edee2309a38f64961eff6186
Author: Wu Sheng <wu...@foxmail.com>
AuthorDate: Sun Aug 2 23:59:35 2020 +0800

    Exporter INCREMENT mode is not working.
---
 .../server/core/analysis/worker/MetricsPersistentWorker.java | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/worker/MetricsPersistentWorker.java b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/worker/MetricsPersistentWorker.java
index ae68a20..fd1eb6f 100644
--- a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/worker/MetricsPersistentWorker.java
+++ b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/worker/MetricsPersistentWorker.java
@@ -176,17 +176,17 @@ public class MetricsPersistentWorker extends PersistenceWorker<Metrics> {
                     cachedMetrics.calculate();
                     prepareRequests.add(metricsDAO.prepareBatchUpdate(model, cachedMetrics));
                     nextWorker(cachedMetrics);
-
-                    /*
-                     * The `data` should be not changed in any case. Exporter is an async process.
-                     */
-                    nextExportWorker.ifPresent(exportEvenWorker -> exportEvenWorker.in(
-                        new ExportEvent(metrics, ExportEvent.EventType.INCREMENT)));
                 } else {
                     metrics.calculate();
                     prepareRequests.add(metricsDAO.prepareBatchInsert(model, metrics));
                     nextWorker(metrics);
                 }
+
+                /*
+                 * The `metrics` should be not changed in all above process. Exporter is an async process.
+                 */
+                nextExportWorker.ifPresent(exportEvenWorker -> exportEvenWorker.in(
+                    new ExportEvent(metrics, ExportEvent.EventType.INCREMENT)));
             }
         } catch (Throwable t) {
             log.error(t.getMessage(), t);