youjie23 commented on code in PR #13539:
URL: https://github.com/apache/skywalking/pull/13539#discussion_r2508155907


##########
oap-server/server-alarm-plugin/src/main/java/org/apache/skywalking/oap/server/core/alarm/provider/RunningRule.java:
##########
@@ -447,6 +477,117 @@ private void init() {
                 values.add(null);
             }
         }
+
+        public class AlarmStateMachine {
+            @Getter
+            private int silenceCountdown;
+            @Getter
+            private int recoveryObservationCountdown;
+            private final int silencePeriod;
+            private final int recoveryObservationPeriod;
+            private State currentState;
+
+            public AlarmStateMachine(int silencePeriod, int 
recoveryObservationPeriod) {
+                this.currentState = State.NORMAL;
+                this.silencePeriod = silencePeriod;
+                this.recoveryObservationPeriod = recoveryObservationPeriod;
+                this.silenceCountdown = -1;
+                this.recoveryObservationCountdown = recoveryObservationPeriod;

Review Comment:
   Thank you. You've correctly summarized the logic. As per #13492, the current 
plan is to recover the alarm immediately when conditions aren't met, with the 
observation period being configurable (default: 0) to avoid flapping. Does this 
approach seem reasonable to you?​ We can adjust if needed.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to