CASSSIDECAR-426: Add FileBasedConfigurationProvider for file-based overlay persistence#352
Open
pauloricardomg wants to merge 10 commits into
Open
Conversation
Introduce the pluggable overlay storage abstraction as defined in CEP-62 with ConfigurationProvider interface, CassandraConfigurationOverlay model, ConfigurationOverlaySnapshot wrapper, and InMemoryConfigurationProvider sample implementation.
… String> Make update semantics consistent between cassandraYaml and extraJvmOpts: both now use a map where a null value removes the entry and a non-null value upserts it. Keys use the full JVM flag (e.g. -Dcassandra.jmx.local.port).
…mmutability The constructor now deep-copies the input ObjectNode so that external mutation of the original reference cannot corrupt the overlay. The accessor documents that callers must not mutate the returned node.
Improves readability of CassandraConfigurationOverlay and ConfigurationOverlaySnapshot string representations in logs and debugging output.
…rlay/storeOverlay
… String> extraJvmOpts
…erlay persistence
Implement the default ConfigurationProvider that persists overlays as
JSON files under per-instance directories ({configDir}/{instanceId}/config.json).
Writes are atomic via temp file + rename. Hash-based optimistic concurrency
control rejects stale updates. Add Jackson annotations and JavaTimeModule
to ConfigurationOverlaySnapshot for direct JSON serialization.
a45830f to
bd32867
Compare
ad56510 to
c7b8446
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Implement
FileBasedConfigurationProvider, the defaultConfigurationProvidershipped with Sidecar as defined in CEP-62 (CASSSIDECAR-424).{configDir}/{instanceId}/config.jsonFiles.move(ATOMIC_MOVE)to prevent corruption from crashesstoreOverlaycalls when the provided hash doesn't match the current overlay hash@JsonCreator,@JsonProperty,@JsonIgnore) andJavaTimeModuletoConfigurationOverlaySnapshotfor direct JSON serializationjackson-datatype-jsr310fromintegrationTestImplementationtoimplementationscopeTest plan