Support Session suspend and resume #2034
Open
+261
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is somewhat based on discussions on https://lists.apache.org/thread/9sms1sk8fd739mp7699wrbj0vnd0kzd1
If an application wants to use OpenJDK CRaC it must terminate all connections to nodes before checkpoint. Here we expose a high-level API in SessionLifecycleManager without relying on CRaC itself. Also it is pretty clear that it does not pose any risk to application that won't use this API.
Our current goal is to support CRaC checkpoint in Spring Boot application. My first attempt in spring-projects/spring-boot#44505 was declined because the way Cassandra Java Driver was accessed seemed too low-level for Spring Boot; I expect that with the API this PR introduces the Spring Boot integration could just invoke the methods without relying on driver internals.
I expect that in the future
SessionLifecycleManager
could expose methods for hinting the driver if all nodes died and the driver has to reconnect to a completely new node.