pauloricardomg opened a new pull request, #352:
URL: https://github.com/apache/cassandra-sidecar/pull/352

   ## Summary
   
   Implement `FileBasedConfigurationProvider`, the default 
`ConfigurationProvider` shipped with Sidecar as defined in CEP-62 
(CASSSIDECAR-424).
   
   - Persists configuration overlays as JSON files at 
`{configDir}/{instanceId}/config.json`
   - Atomic writes via temp file + `Files.move(ATOMIC_MOVE)` to prevent 
corruption from crashes
   - Hash-based optimistic concurrency control rejects `storeOverlay` calls 
when the provided hash doesn't match the current overlay hash
   - Per-instance locking for thread safety under concurrent access
   - Add Jackson annotations (`@JsonCreator`, `@JsonProperty`, `@JsonIgnore`) 
and `JavaTimeModule` to `ConfigurationOverlaySnapshot` for direct JSON 
serialization
   - Promote `jackson-datatype-jsr310` from `integrationTestImplementation` to 
`implementation` scope
   
   ## Test plan
   
   - [x] Overlay CRUD: store and retrieve, hash preserved across serialization 
round-trip
   - [x] Optimistic concurrency: stale hash rejected, null hash on existing 
overlay rejected, hash on missing overlay rejected
   - [x] Instance isolation: overlays for different instances are independent
   - [x] Concurrent writes (same instance): only one thread succeeds, others 
get conflict
   - [x] Concurrent writes (different instances): all succeed
   - [x] Persistence across provider instances: new provider over same 
directory reads previously stored data
   - [x] Directory structure created on demand
   - [x] No partial/temp files left after write
   - [x] Overwrite existing overlay with valid hash succeeds
   - [x] Extra JVM opts round-trip correctly


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to