style95 commented on code in PR #5338:
URL: https://github.com/apache/openwhisk/pull/5338#discussion_r1000212237
##########
core/scheduler/src/main/scala/org/apache/openwhisk/core/scheduler/FPCSchedulerServer.scala:
##########
@@ -59,13 +59,21 @@ class FPCSchedulerServer(scheduler: SchedulerCore,
systemUsername: String, syste
logger.warn(this, "Scheduler is disabled")
scheduler.disable()
complete("scheduler disabled")
- } ~ (path(FPCSchedulerServer.queuePathPrefix / "total") & get) {
- complete {
- scheduler.getQueueSize.map(_.toString)
+ } ~ (path(FPCSchedulerServer.queuePathPrefix) & get) {
+ pathEndOrSingleSlash {
+ complete(scheduler.getQueueStatusData.map(s => s.toJson))
+ } ~ (path("count") & get) {
+ complete(scheduler.getQueueSize.map(s => s.toJson))
}
- } ~ (path(FPCSchedulerServer.queuePathPrefix / "status") & get) {
- complete {
- scheduler.getQueueStatusData.map(s => s.toJson)
+ } ~ (path("activation" / "count") & get) {
Review Comment:
Currently, that is handled in this way.
1. When a scheduler is disabled, it will first remove its endpoint from ETCD.
2. Controllers no longer send any new requests to the scheduler as there is
no endpoint.
3. Still, messages in Kafka can be delivered to the scheduler because the
consumer does not shut down.
4. Before the number of in-flight activation becomes 0, the scheduler is not
deployed.
5. Once all activations are handled, the scheduler will be redeployed.
--
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]