mirror of
https://github.com/floci-io/floci.git
synced 2026-11-27 23:59:27 -05:00
A Neptune cluster's graph lived only in its container: Gremlin Server's TinkerGraph kept it in memory, and Neo4j in the unnamed volume its image declares for /data. Removing the container, as Floci's shutdown does, lost it, so a cluster could never be started again with its graph. When Neptune's records are kept (its own storage mode, or the global one, is persistent, hybrid or wal), a new cluster now gets a volume ID, kept in its record, and its container mounts floci-aws-neptune-<id>, or binds <host-path>/neptune/<id> when the host persistent path is an absolute path. Neo4j keeps its data directory there. Gremlin Server's image has its data directory there, and Floci writes the image's TinkerGraph properties before the container starts so the graph is saved to it when the server stops and loaded from it when it starts. Under the host path Gremlin Server runs as root, since the directory belongs to whoever created it rather than to the image's gremlin user. An image laid out otherwise keeps its graph in memory, with a warning. A container now has 30 seconds to stop before Docker kills it, as Gremlin Server saves its graph a few seconds after the stop signal. DeleteDBCluster removes the volume as the storage policy says, under the storage mode Neptune's records are kept in, its own or the global one; a create that fails removes it whatever the policy. A cluster created again under a deleted one's identifier starts on a new, empty volume. Starting the clusters' containers again on these volumes when Floci restarts comes next. Part of #5664.