Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

End-2-end graceful shutdown support #1520

Merged
merged 88 commits into from
Nov 21, 2022

Conversation

stmaute
Copy link
Contributor

@stmaute stmaute commented Oct 24, 2022

With this PR we add support for a better end-2-end graceful shutdown behaviour.
We have implemented some mechanisms to handle inflight requests to wait for the responses.

yufei-cai and others added 30 commits August 11, 2022 14:17
Signed-off-by: Yufei Cai <yufei.cai@bosch.io>
… sharded actors.

Signed-off-by: Yufei Cai <yufei.cai@bosch.io>
…egionCreatorTest.

Signed-off-by: Yufei Cai <yufei.cai@bosch.io>
Signed-off-by: Yufei Cai <yufei.cai@bosch.io>
Signed-off-by: Yufei Cai <yufei.cai@bosch.io>
Signed-off-by: Yufei Cai <yufei.cai@bosch.io>
Signed-off-by: Yufei Cai <yufei.cai@bosch.io>
Signed-off-by: Yufei Cai <yufei.cai@bosch.io>
Reason: Ditto pubsub reacts too slowly for coordinated shutdown.

Signed-off-by: Yufei Cai <yufei.cai@bosch.io>
Signed-off-by: Yufei Cai <yufei.cai@bosch.io>
Signed-off-by: Yufei Cai <yufei.cai@bosch.io>
Signed-off-by: Yufei Cai <yufei.cai@bosch.io>
Signed-off-by: Stefan Maute <stefan.maute@bosch.io>
Signed-off-by: Stefan Maute <stefan.maute@bosch.io>
Signed-off-by: Stefan Maute <stefan.maute@bosch.io>
Signed-off-by: Stefan Maute <stefan.maute@bosch.io>
Signed-off-by: Yufei Cai <yufei.cai@bosch.io>
Reason: Twin operations can include acknowledgement requests.

Signed-off-by: Yufei Cai <yufei.cai@bosch.io>
Signed-off-by: Stefan Maute <stefan.maute@bosch.io>
…m pubSubMediator;

Signed-off-by: Stefan Maute <stefan.maute@bosch.io>
Signed-off-by: Stefan Maute <stefan.maute@bosch.io>

# Conflicts:
#	internal/utils/persistent-actors/src/main/java/org/eclipse/ditto/internal/utils/persistentactors/AbstractPersistenceSupervisor.java
#	thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/starter/actors/SearchRootActor.java
#	thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/updater/actors/NewEventForwarder.java
#	thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/updater/actors/ShardRegionFactory.java
#	thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/updater/actors/ThingsUpdater.java
Signed-off-by: Stefan Maute <stefan.maute@bosch.io>
Signed-off-by: Stefan Maute <stefan.maute@bosch.io>
Signed-off-by: Stefan Maute <stefan.maute@bosch.io>
Signed-off-by: Stefan Maute <stefan.maute@bosch.io>
fixed javadoc and typo;

Signed-off-by: Stefan Maute <stefan.maute@bosch.io>
…ough time to complete;

removed match for DistributedPubSubMediator.SubscribeAck from GatewayProxyActor and EdgeCommandForwarderActor because no subscribe message is send via pudSubMediator;
wait with stopping the AbstractHttpRequestActor until the request is completed;
add test to HttpRequestActorTest;

Signed-off-by: Stefan Maute <stefan.maute@bosch.io>
…e and remove task when actor is shutdown;

wait for requests in QueryThingsPerRequestActor;
pass httpConfig to GatewayProxyActor and QueryThingsPerRequestActor;
add test to QueryThingsPerRequestActorTest,

Signed-off-by: Stefan Maute <stefan.maute@bosch.io>
…ed for terminating the websocket session;

extend Connect with an optional killSwitch;
shutdown websocket streams in service requests done phase of CoordinatedShutdown;

Signed-off-by: Stefan Maute <stefan.maute@bosch.io>
rename method;

Signed-off-by: Stefan Maute <stefan.maute@bosch.io>
yufei-cai and others added 20 commits October 6, 2022 00:26
Signed-off-by: Yufei Cai <yufei.cai@bosch.io>
…restarts.

Signed-off-by: Yufei Cai <yufei.cai@bosch.io>
…estore connection connection announcements.

Signed-off-by: Yufei Cai <yufei.cai@bosch.io>
…istenceActorTest.

Signed-off-by: Yufei Cai <yufei.cai@bosch.io>
Signed-off-by: Yufei Cai <yufei.cai@bosch.io>
…restarts during coordinated shutdown.

Signed-off-by: Yufei Cai <yufei.cai@bosch.io>
Signed-off-by: Yufei Cai <yufei.cai@bosch.io>
…velope for communication between the connection persistence actor and its client actors.

Reason: Consistent hashable envelope is not serializable.

Still to do: Make all messages wrapped in ShardedBinaryEnvelope serializable, i. e., ClientActorPropsArgs.

Signed-off-by: Yufei Cai <yufei.cai@bosch.io>
Signed-off-by: Yufei Cai <yufei.cai@bosch.io>
Signed-off-by: Yufei Cai <yufei.cai@bosch.io>
…ctionStatusResponse.

Signed-off-by: Yufei Cai <yufei.cai@bosch.io>
… namespaces replicator in connectivity.

Signed-off-by: Yufei Cai <yufei.cai@bosch.io>
Signed-off-by: Yufei Cai <yufei.cai@bosch.io>
…cator.

Signed-off-by: Yufei Cai <yufei.cai@bosch.io>
Signed-off-by: Yufei Cai <yufei.cai@bosch.io>
Signed-off-by: Yufei Cai <yufei.cai@bosch.io>
…r when acknowledgements are forwarded.

Signed-off-by: Yufei Cai <yufei.cai@bosch.io>
…ing actor when acknowledgements are forwarded."

This reverts commit 1612e74.

Signed-off-by: Yufei Cai <yufei.cai@bosch.io>
…down."

This reverts commit 0e2259f.

Signed-off-by: Yufei Cai <yufei.cai@bosch.io>
Signed-off-by: Stefan Maute <stefan.maute@bosch.io>
@stmaute stmaute added this to the 3.1.0 milestone Oct 25, 2022
Stefan Maute and others added 7 commits October 27, 2022 07:57
Signed-off-by: Stefan Maute <stefan.maute@bosch.io>
Signed-off-by: Stefan Maute <stefan.maute@bosch.io>

# Conflicts:
#	connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/rabbitmq/RabbitMQConsumerActor.java
#	connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/BaseClientActorTest.java
#	connectivity/service/src/test/java/org/eclipse/ditto/connectivity/service/messaging/httppush/HttpPushClientActorTest.java
#	edge/service/src/main/java/org/eclipse/ditto/edge/service/dispatching/ThingsAggregatorProxyActor.java
#	edge/service/src/test/java/org/eclipse/ditto/edge/service/dispatching/ThingsAggregatorProxyActorTest.java
#	policies/service/src/test/java/org/eclipse/ditto/policies/service/persistence/actors/PolicyPersistenceOperationsActorIT.java
#	things/service/pom.xml
#	things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/ThingSupervisorActor.java
#	thingsearch/service/src/main/java/org/eclipse/ditto/thingsearch/service/starter/actors/SearchActor.java
…test;

Signed-off-by: Stefan Maute <stefan.maute@bosch.io>
Signed-off-by: Yufei Cai <yufei.cai@bosch.io>
Signed-off-by: Yufei Cai <yufei.cai@bosch.io>
Signed-off-by: Yufei Cai <yufei.cai@bosch.io>
Signed-off-by: Yufei Cai <yufei.cai@bosch.io>
@stmaute stmaute merged commit 825fce4 into eclipse-ditto:master Nov 21, 2022
@stmaute stmaute deleted the feature/graceful-shutdown branch November 21, 2022 05:47
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants