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/11/05 04:36:23 UTC
[skywalking] branch master updated: Silent NPE fix in persistent process (#9909)
This is an automated email from the ASF dual-hosted git repository.
wusheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking.git
The following commit(s) were added to refs/heads/master by this push:
new 6984bbc65a Silent NPE fix in persistent process (#9909)
6984bbc65a is described below
commit 6984bbc65a4c12009e095e376b5e6ffb3a90db59
Author: Brandon Fergerson <bf...@apache.org>
AuthorDate: Sat Nov 5 08:36:18 2022 +0400
Silent NPE fix in persistent process (#9909)
Just avoid NPE in codes.
---
.../server/storage/plugin/elasticsearch/base/BatchProcessEsDAO.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/base/BatchProcessEsDAO.java b/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/base/BatchProcessEsDAO.java
index cb8bdce62f..dc6c47bb19 100644
--- a/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/base/BatchProcessEsDAO.java
+++ b/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/base/BatchProcessEsDAO.java
@@ -86,7 +86,9 @@ public class BatchProcessEsDAO extends EsDAO implements IBatchDAO {
@Override
public void endOfFlush() {
- // Flush forcedly due to this kind of metrics has been pushed into the bulk processor.
- bulkProcessor.flush();
+ // Flush forcibly due to this kind of metrics has been pushed into the bulk processor.
+ if (bulkProcessor != null) {
+ bulkProcessor.flush();
+ }
}
}