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

rongr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git


The following commit(s) were added to refs/heads/master by this push:
     new f9c8983a1c add realtime consumption exception to LL consumer data 
manager metrics (#10074)
f9c8983a1c is described below

commit f9c8983a1c42ed97a61a2778ba91d014ee4171ab
Author: Rong Rong <ro...@apache.org>
AuthorDate: Mon Jan 9 09:19:00 2023 -0800

    add realtime consumption exception to LL consumer data manager metrics 
(#10074)
    
    * adding realtime consumption exception to LL consumer data manager
    * address comments
    
    Co-authored-by: Rong Rong <ro...@startree.ai>
---
 .../core/data/manager/realtime/LLRealtimeSegmentDataManager.java    | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git 
a/pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/LLRealtimeSegmentDataManager.java
 
b/pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/LLRealtimeSegmentDataManager.java
index b720f486bb..2f38640568 100644
--- 
a/pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/LLRealtimeSegmentDataManager.java
+++ 
b/pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/LLRealtimeSegmentDataManager.java
@@ -378,6 +378,9 @@ public class LLRealtimeSegmentDataManager extends 
RealtimeSegmentDataManager {
   private void handleTransientStreamErrors(Exception e)
       throws Exception {
     _consecutiveErrorCount++;
+    
_serverMetrics.addMeteredGlobalValue(ServerMeter.REALTIME_CONSUMPTION_EXCEPTIONS,
 1L);
+    _serverMetrics.addMeteredTableValue(_tableStreamName, 
ServerMeter.REALTIME_CONSUMPTION_EXCEPTIONS,
+        1L);
     if (_consecutiveErrorCount > MAX_CONSECUTIVE_ERROR_COUNT) {
       _segmentLogger.warn("Stream transient exception when fetching messages, 
stopping consumption after {} attempts",
           _consecutiveErrorCount, e);
@@ -420,6 +423,9 @@ public class LLRealtimeSegmentDataManager extends 
RealtimeSegmentDataManager {
         _endOfPartitionGroup = messageBatch.isEndOfPartitionGroup();
         _consecutiveErrorCount = 0;
       } catch (PermanentConsumerException e) {
+        
_serverMetrics.addMeteredGlobalValue(ServerMeter.REALTIME_CONSUMPTION_EXCEPTIONS,
 1L);
+        _serverMetrics.addMeteredTableValue(_tableStreamName, 
ServerMeter.REALTIME_CONSUMPTION_EXCEPTIONS,
+            1L);
         _segmentLogger.warn("Permanent exception from stream when fetching 
messages, stopping consumption", e);
         throw e;
       } catch (Exception e) {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to