Repository navigation
feat: Phase 4 — Saga transactions, virtual threads, and test coverage - #4
Merged
Merged
Conversation
New module `sharding-saga`: - ShardSagaStep<T> — execute + compensate interface - ShardSagaDefinition<T> — immutable ordered step list with fluent builder - ShardSagaOrchestrator — forward execution with automatic reverse compensation - ShardSagaLog — immutable per-step audit record - ShardSagaException — carries sagaId + full audit log on failure - ShardingSagaAutoConfiguration — enabled via sharding.saga.enabled=true - ShardSagaOrchestratorTest — 7 scenarios covering happy-path, partial failure, first-step failure, reverse compensation order, and audit log assertions sharding-core addition: - VirtualThreadShardExecutor — factory for ExecutorService backed by JDK 21 virtual threads (reflection-based, stays source-compatible with JDK 17); falls back to cached daemon thread pool on JDK 17–20 Test coverage gaps filled: - ShardKeyExtractorTest (sharding-aop) — all 3 extraction modes + error paths - MeteredShardRouterTest (sharding-metrics) — counter, timer, delegation - ReadWriteRoutingDataSourceTest (sharding-readwrite) — primary/replica routing, round-robin selection, no-replica fallback - ShardMigrationServiceTest (sharding-migration) — state machine transitions, key-range matching, invalid input, query methods Infrastructure: - parent pom.xml: added sharding-saga module - sharding-spring-boot-starter: added sharding-saga optional dep + auto-config import - CHANGELOG.md + README.md: documented v4.0 https://claude.ai/code/session_01FTX9NsM4K1pu3c8yekzQ8m
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.
New module
sharding-saga:sharding-core addition:
Test coverage gaps filled:
Infrastructure:
https://claude.ai/code/session_01FTX9NsM4K1pu3c8yekzQ8m
Description
Brief description of the changes in this PR.
Type of Change
Related Issue
Fixes #(issue number)
Changes Made
Testing
Checklist
Screenshots (if applicable)
Add screenshots to help explain your changes.
Additional Notes
Any additional information that reviewers should know.