Skip to content

Crac Support - Lifecycle Implementation #1486

Closed as not planned
Closed as not planned
@michaelmcfadyensky

Description

@michaelmcfadyensky

To be able to use Crac with spring boot applications, all open connections need to be closed before a checkpoint is taken and then they need to be re-established after a checkpoint is restored.

Spring framework has added in support for automatically stopping any implementations of Lifecycle before the checkpoint and starting them after the checkpoint restore. (spring-projects/spring-framework#29921)

There has been several issues/PRs raised to provide support for this for kafka, web servers, redis, jdbc etc (spring-projects/spring-kafka#2760) however there is currently no support for cassandra.

Currently, if you attempt to take a checkpoint of a spring cassandra app, it will result in the following error.

jdk.internal.crac.CheckpointException
        at java.base/jdk.internal.crac.Core.checkpointRestore1(Core.java:122)
        at java.base/jdk.internal.crac.Core.checkpointRestore(Core.java:246)
        at java.base/jdk.internal.crac.Core.checkpointRestoreInternal(Core.java:262)
        Suppressed: jdk.internal.crac.impl.CheckpointOpenSocketException: tcp localAddr 172.17.0.3 localPort 52866 remoteAddr 172.17.0.5 remotePort 9042
                at java.base/jdk.internal.crac.Core.translateJVMExceptions(Core.java:91)
                at java.base/jdk.internal.crac.Core.checkpointRestore1(Core.java:145)
                ... 2 more

(i've condensed the full error log as its very long)

Requirements

  • To be able to use Crac in a spring boot app with the spring data cassandra starter

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: declinedA suggestion or change that we don't feel we should currently apply

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions