@@ -62,20 +62,17 @@ class InvokerHealthManager(instanceId: InvokerInstanceId,
62
62
InvokerHealthManager .prepare(entityStore, instanceId).map { _ =>
63
63
startTestAction(self)
64
64
}
65
-
66
65
goto(Unhealthy )
67
66
}
68
67
69
68
when(Unhealthy ) {
70
69
case Event (ContainerRemoved , _) =>
71
70
healthActionProxy = None
72
71
startTestAction(self)
73
-
74
72
stay
75
73
76
74
case Event (msg : FailureMessage , _) =>
77
75
logging.error(this , s " invoker ${instanceId}, status: ${stateName} got a failure message: ${msg}" )
78
-
79
76
stay
80
77
81
78
case Event (ContainerCreationFailed (_), _) =>
@@ -92,6 +89,7 @@ class InvokerHealthManager(instanceId: InvokerInstanceId,
92
89
case Event (_ : Initialized , _) =>
93
90
// Initialized messages sent by ContainerProxy for HealthManger
94
91
stay()
92
+
95
93
case Event (ContainerRemoved , _) =>
96
94
// Drop messages sent by ContainerProxy for HealthManger
97
95
healthActionProxy = None
@@ -114,9 +112,7 @@ class InvokerHealthManager(instanceId: InvokerInstanceId,
114
112
// in case of StatusRuntimeException: NOT_FOUND: etcdserver: requested lease not found, we need to get the lease again.
115
113
case Event (t : FailureMessage , _) =>
116
114
logging.error(this , s " Failure happens, restart InvokerHealthManager: ${t}" )
117
-
118
115
goto(Offline )
119
-
120
116
}
121
117
122
118
// It is important to note that stateName and the stateData in onTransition callback refer to the previous one.
@@ -147,9 +143,7 @@ class InvokerHealthManager(instanceId: InvokerInstanceId,
147
143
148
144
case _ -> newState =>
149
145
publishHealthStatusAndStay(newState, nextStateData)
150
-
151
146
unstashAll()
152
-
153
147
}
154
148
155
149
private def publishHealthStatusAndStay (state : InvokerState , stateData : InvokerHealthData ) = {
@@ -162,14 +156,11 @@ class InvokerHealthManager(instanceId: InvokerInstanceId,
162
156
data.memory.inProgressMemory,
163
157
instanceId.tags,
164
158
instanceId.dedicatedNamespaces)
165
- InvokerHealthManager .useMemory = invokerResourceMessage.busyMemory + invokerResourceMessage.inProgressMemory
166
159
dataManagementService ! UpdateDataOnChange (InvokerKeys .health(instanceId), invokerResourceMessage.serialize)
167
-
168
160
stay using data.copy(currentInvokerResource = Some (invokerResourceMessage))
169
161
170
162
case data =>
171
163
logging.error(this , s " unexpected data is found: $data" )
172
-
173
164
stay
174
165
}
175
166
}
@@ -281,9 +272,6 @@ object InvokerHealthManager {
281
272
val healthActionNamePrefix = " invokerHealthTestAction"
282
273
val bufferSize = 10
283
274
val bufferErrorTolerance = 3
284
-
285
- var useMemory = 0l
286
-
287
275
val healthActionIdentity : Identity = {
288
276
val whiskSystem = " whisk.system"
289
277
val uuid = UUID ()
0 commit comments