Repository navigation
fix: enforce Shiro realm strategies on feature branch - #6
Merged
Merged
Conversation
loong10k
added a commit
that referenced
this pull request
Nov 18, 2026
Backport PR #6 coverage for binary and warm-restarted Memcached sources and the observed Redisson write interval.
loong10k
added a commit
that referenced
this pull request
Nov 18, 2026
Backport PR #6 coverage for binary and warm-restarted Memcached sources and the observed Redisson write interval.
loong10k
added a commit
that referenced
this pull request
Nov 18, 2026
Backport PR #6 coverage for binary and warm-restarted Memcached sources and the observed Redisson write interval.
loong10k
added a commit
that referenced
this pull request
Nov 19, 2026
loong10k
added a commit
that referenced
this pull request
Nov 19, 2026
loong10k
added a commit
that referenced
this pull request
Nov 19, 2026
This was referenced Nov 19, 2026
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.
Supersedes draft PR #5 on the required
feature/REQ-*branch at the identical source commit1c04f43396d89603182d186845d6fca735e4a8be. The existing local POM and docs edits in the repository checkout were not included.Problem and repair
The custom authenticator skipped its configured strategy when multiple realms were configured but only one supported the token. This let AtLeastTwo accept a single successful password realm. Multi-configured-realm authentication now executes the configured strategy; truly single-configured-realm behavior follows Shiro's existing contract.
OnlyOne now rejects zero-success results at the authenticator layer and counts successful realm callbacks per invocation, including same-named realms. Both custom count strategies aggregate copies of principal collections and mutable credential collections, avoiding mutation of cached realm results across attempts. DefaultCredentialsMatcher evaluates its protected comparison exactly once. The hashed matcher synchronizes lazy cache initialization and its direct cache setter for safe publication. OnlyOne also explicitly rejects non-null realm results with null/empty principals using AuthenticationException, even if another realm succeeded.
Compatibility
Validation
clean verify: 40 tests, zero failures/errors/skips.Retry-counter status
The shared provider adapters below implement atomic reservations and preserve the expiry policy for configured retry stores. Matchers that still use the legacy Shiro Cache path retain its concurrency limitations. A rollout that switches an existing deployment to the new store still needs a migration or cutover plan for active retry windows.
Shiro CI now pins JWT issuer
c6edbf6a56a0c8ae6409b9fc1b0ef9639c4063d1, which contains the merged verification-key and parser-configuration isolation tests. At Shiro head53b701e08794261e5a96d7a1d4c6c20eaecff950, JDK 17 source verification passed, including the pinned upstream build, Shiro build, and coverage data checks.Keep this PR in draft. No ready, approval or merge operation is part of this update.
Replacement PR exact-head CI 44216060538 passed at
1c04f43396d89603182d186845d6fca735e4a8be. Old PR #5 was closed as a duplicate. This does not resolve the retry-counter or coverage limitations above.Shared retry store integration
Commit
dec5b27ef9526bb14f69568ab9748eb8c6e7751fadds the provider contract and wires both matcher implementations to it when configured. An attempt reserves a count and window identifier before credential verification. Success can clear only that window. The provider contract requires atomic reservation and conditional reset under the provider's existing expiration policy.JDK 17 reactor
clean verifypassed 42 tests. New tests exercise a common store used by two matcher instances and a delayed successful comparison after a new window becomes active. The fixture exercises matcher wiring and window ownership. Provider implementations, starter wiring and real shared-cache expiry and concurrency tests remain open. Existing unconfigured Shiro cache paths retain their prior behavior.Redis provider implementation
Commit
29d2e68e672cc42d97b2493ebfbd7241359bc75fadds a Redis-backed retry store. Each operation executes on a single principal key. The first reservation sets the configured expiry, increments retain the exact Redis expiry deadline, and reset is conditional on window identity. Counts saturate at the matcher integer limit.Local JDK 17 reactor verification ran 45 tests, including three against an isolated Redis 8.4.0 process. The provider tests cover two concurrent callers sharing one key, an unchanged expiration deadline, reservation after expiry, stale reset, persistent configuration, and saturation. The PR workflow starts an isolated Redis container for the same tests.
The adapter takes a configured script executor and a dedicated namespace. Starter wiring and migration of legacy entries remain separate gates, along with the other shared providers and their TTL tests. A working Redis adapter does not resolve the full provider requirement.
JCache provider implementation
Commit
6ff281921232c71e35e96f0f6905ba829538c0e5adds an atomic JCache retry store for a dedicated store-by-value cache that preserves its creation expiry on access and update. It validates the expiry contract at setup and uses a provider-side entry processor for reservation and conditional reset. All executing cache members need this module on the classpath.Local JDK 17 reactor verification ran 48 tests with zero failures/errors/skips. The new suite runs against two loopback Hazelcast 3.12.13 members and verifies unique counts across members, expiration at the original window, reset after expiration, rejection of stale reset, counter saturation, and rejection of an expiry policy that restarts the window on update. The existing Redis tests ran against a separate isolated Redis process.
This validates the Hazelcast JCache path. Wiring the existing Hazelcast IMap, Ehcache, Redis/Redisson, J2Cache and Spring cache configurations, and migrating legacy counter entries, are still part of the confirmed shared-provider scope.
Native Ehcache 3
Commit
9ebe0ffdc1b8a52978a3e72317e6829e340ba989adds native Ehcache 3 reservation and conditional reset using provider CAS operations. The dedicated retry cache uses either its configured fixed creation window or eternal expiry. The fixed-window policy leaves the deadline unchanged on reads and updates. Attempt equality includes both identity and count, so provider serialization does not weaken the comparison.Local JDK 17 reactor verification passed 51 tests. Three new tests use real Ehcache 3.6.0 off-heap storage for concurrent reservations, deterministic expiry, stale reset, saturation and rejection of an expiry policy that renews the window. A separate local verification used the official Ehcache 3.6.0 clustering kit (Terracotta 5.5.0), a loopback server and two independent client cache managers configured for strong consistency. It passed concurrent unique reservations, expiry at the original deadline, and late reset protection. The general starter binding and prior counter migration remain open, as do the remaining shared-provider paths.
Native Ehcache 2
Native Hazelcast 5
Redisson
J2Cache with Jedis
J2Cache with Lettuce
J2Cache with Memcached
Spring Cache wrappers
Native Hazelcast 3.12
shiro-extension-hazelcast3module for the 3.12 IMap API. It reuses the native map's key lock, preserves the original TTL at Hazelcast's whole-second precision, and keeps the configured idle expiry even when a thin client cannot read it from entry metadata.Spring Data Redis 4
Spring Boot retry-store binding
CredentialRetryStorebean namedshiro.credential-retry.<cacheName>to both supported matchers, including matchers created inside Spring-managed authenticating realms. Explicit assignments and legacy cache fallback retain their existing behavior.Shiro 3.0.x backport
b11767ce9d39e4e77f578dd81501c97ecf49ed6dcarries the authentication and shared retry-store changes on Shiro 3.0.1, Spring Framework 7.0.8, and Spring Boot 4.1.2.Shiro 2.0.x backport
048cc8fba66d300a7ae291bea204430a073ebf05carries the repair on Shiro 2.2.1, Spring Framework 6.2.19 and Spring Boot 3.5.16. Spring Data Redis 3.5 coverage includes per-key TTL and time-to-idle.Shiro 1.0.x backport
40c7554ac82c7e1b3e8edbead681fde9bf82c086carries the repair on Java 8, Shiro 1.13.0, Spring Framework 5.3.36 and Boot 2.7.18. The branch uses Spring Data Redis 2.7 and includes the native Hazelcast 3 adapter.Spring Boot 4.1 downstream verification
The Starter's merged Servlet compatibility repair uses Shiro 1.13.0. Its retry integration feature branch at
afb35f291c1226fe2349c1be34a4aadb2ff34b63consumes the verified Shiro Extension 1.0.x artifacts. The actual Starter passed 32 tests under JDK 21 and Boot 4.1.2, with 90.09% line coverage against the existing 90% requirement. The Servlet context test verifies Boot discovers the retry auto-configuration and a Spring-managed realm uses the named store.The test used Shiro Extension artifacts built from
40c7554ac82c7e1b3e8edbead681fde9bf82c086and installed in an isolated local Maven repository. Publication of that dependency, integration-branch promotion, and production migration of active retry windows are pending.Active Ehcache 2 retry windows
The pre-cutover Ehcache 2 format stores an
AtomicIntegerat the original principal key. The first native retry reservation after cutover converts it under the same provider key lock, counts the current attempt, and preserves creation time, TTL deadline and idle expiry policy. Conditional clear leaves an unconverted legacy value intact. Existing old clients must be stopped before enabling the shared store on their former region because they still read the old value type. Reuse the region and key mapping. Clustered deployments still require a strongly consistent Terracotta region.The regression produced a
ClassCastExceptionon the previous source. It now observes 3 → 4 → 5 with one converted window, unchanged TTL deadline, and the configured TTI. All four local reactor runs passed with zero failures, errors or skips.a78fa5cb56d39f45c948dbe4a7d4a7176eb317bc25c2aa48a75da8554320a5fad06bc07f9da979906e2399957b0126d427c695679fa64c27e018e46387ce6e5e586c98d4388b8e23054805de67b490acThe migration fixture used a real local Ehcache 2 region with copy-on-read and copy-on-write. Terracotta cutover and active-window migration for the other providers remain open.
Active Hazelcast retry windows
The native Hazelcast 5.2+ and 3.12 adapters now read and convert a legacy
AtomicIntegeron the original IMap key inside the provider's atomic reservation. Hazelcast 5 uses the expiry-preserving entry update. Hazelcast 3.12 uses the original remaining TTL at its native second precision, taking the previous update timestamp into account. Stale clears leave an unconverted legacy entry intact. The cutover uses the same IMap and principal keys after old clients stop, with the updated module on all cluster members.Both real-cluster regressions produced a type-cast failure before the fix. They now observe 3 → 4 → 5 in the same active window with its exact observed TTL deadline. The 3.12 test uses a thin client and a legacy entry updated after creation. Four full local reactor runs passed with zero failures, errors, or skips.
944ef42cd193a64e2cfa21b2a46a171c5d6023f8861c6a38b12c730660ae820567ded0950039f6af19eedff4eb2030962e4eae617d3c36f2343b00ef127b35a6dd5d4e6dd46e78d2e320df9e4330e8fdActive-window migration for the other providers and actual deployment cutover remain open.
Active JCache retry windows
A JCache region that already supports both legacy and new values can be reused after its old clients stop. One provider entry processor converts the persisted
AtomicIntegerand reserves the current attempt. The store requires unchanged expiry on update and access. A conditional clear leaves an unconverted entry intact. Regions configured forAtomicIntegeralone are rejected before use. The Spring bridge uses the same core validation and conversion.A real two-member JCache cluster reproduced the previous type-cast failure and now confirms 3 → 4 → 5 across members, one window ID, and expiry at the original deadline. A Spring integration fixture verifies the same conversion through the native cache bridge. Full local builds had zero failures, errors or skips.
b2a9e4a6a77ec8da0b67df1fa9bc0d13868aa20b4f8fa2751e17f892dd1b33196c6eb7b46f31348da9cf1fd1b40b91fbe528a40d23cd9b72ce41dd4fce811b8624f374a6b7431805f6e118c93d025820Native Ehcache 3 remains separate: the installed 3.6.0 provider returned a copy of the legacy counter from off-heap storage and rejected a conditional replace using that copy. Its clustered store also lacks atomic compute. A dedicated migration path is still required for those regions and for legacy-only JCache types.
Active Spring Redis retry windows
Spring Data Redis 2.7, 3.5, and 4 now expose
migrateLegacyWindowfor an exclusive cutover. The source cache determines the key prefix and serializers. A one-key Redis snapshot returns the persisted counter and its deadline without updating it. A second one-key operation creates the destination only if it is absent and the source deadline remains live. The copied counter keeps the original absolute expiry or persistence. Source entries are retained. Complete the import for known string principals with all retry clients paused and reconcile the results before resuming them. Dynamic time-to-idle applies on the first regular reservation.Real Redis tests verify exact source and destination deadlines, existing-window protection, missing and expired sources, persistent zero counters, and the post-import idle policy. Four local reactor builds passed with zero failures, errors, or skips.
632c024efc946b304ed654a00cede34cd3177e4607fece07ff989ebc95caa16690b42ff60eea58c394e9abbab02925fc47ce166ed0eee1980afc1e76b6ba3ec5f1e4efc5a3a97fe5e2c83c41a773f2b9These migration fixtures used standalone Redis. Cluster cutover, non-Spring provider migration, and actual deployment remain open.
Spring Redis cross-primary cutover
Five migration cases across the four feature heads passed against a three-primary Redis 8.4 Cluster. The fixture asserts different primary IDs for the original and destination keys and compares exact Redis deadlines after the move. The tests accept
-Dshiro.redis.test.cluster.nodes=host1:port,host2:port,host3:portfor the targeted migration cases. Cluster nodes must cover all slots.The previous PR CI exposed an asynchronous Spring Data Redis 4 fixture write. The test now seeds the source with synchronous
putIfAbsentand confirms the source has a live deadline before the import. The cutover instructions require outstanding writes to reach Redis before migration. The production migration code is identical to the previous commit.2dca2ca8d962362d606358cacfab7aa5e97281d689a12b742e8c2e9d93e7708c83ab7a91d912cc9721e50e1b93e534345bcb687d38e5d442d02ecf2169f0e77f6a5e849975ae31f1569bb95d4e027c64Targeted cluster selectors are
SpringCredentialRetryStoreIntegrationTest#importsSpringRedisLegacyCountersWithTheOriginalDeadlineandSpringDataRedis4CredentialRetryStoresIntegrationTest#copiesLegacyWindowBeforeIdlePolicyRefreshesIt. All executed local cases had zero failures, errors, or skips. The ordinary GitHub workflows still use standalone Redis. Production cutover and the other provider migration paths remain open.Active J2Cache Redis retry windows
The J2Cache Jedis and Lettuce adapters now expose
migrateLegacyWindowfor an exclusive cutover. The adapter reads raw Redis L2 bytes through the original channel provider and deserializes them with the existing J2Cache serializer. An independent Redis deadline read keeps the generic key expiry or the hash region expiry. The destination import preserves that deadline and writes only to an empty destination. Source entries are retained. Pause old and new retry clients and drain writes before starting.Real Redis tests use both generic and hash layouts for Jedis and Lettuce. They leave a stale value in L1, update the persisted count to three, and observe the next attempt at four under the original deadline. All four local full reactors passed with zero failures, errors, or skips.
1f4ae9ac69733bd65996f5d97dbbd7ca97d6fe4604aebcaaf535cf338bfef1558aef631510e4a27e7b31d685d5b3ec57930502bba9e15d0c3d3c968e1d1ec0bc714a0487e0925f1533fcaf67341a5be0The J2Cache migration tests used standalone Redis. Cluster cutover for these adapters, non-UTF-8 Jedis hash keys, the other provider migrations, and production cutover remain open.
Active J2Cache Memcached retry windows
The J2Cache Memcached adapter now imports a known principal from the explicitly selected source node during an exclusive cutover. Meta Text returns the stored value and remaining lifetime in one read. The adapter derives the original absolute deadline at server-second precision and uses the configured xmemcached destination client with add-if-absent. The legacy entry stays in place and the source node must be selected using the original key routing. Meta Text on a trusted unauthenticated source connection is required for this path.
A real Memcached 1.6.39 fixture validates the exact stored deadline, source key sanitization, count 3 → 4, source preservation, repeated/missing import handling and a persistent zero count. All local full reactors had zero failures, errors, or skips.
5158e09fb5927df763f4bf8b994d6a83928fd4e10464f33fdfd300b1a6954e362e4e4ac974f6585df42d858276208a94d470b6ecf4a907483059ed948ca96aef9951ff938304815fdccc4d9e938cad4eThe fixture used one server. Routed production cutover, authenticated or binary-only source migration, remaining providers, and promotion are still pending.
Active Redisson map-cache retry windows
Redisson 3.12.5
RMapCachemigration reads the persisted counter, fixed deadline, idle period, and current idle deadline in one read-only source script. It uses the original map codecs and leaves the source idle deadline untouched. A shorter map expiry also caps the new window. Import reserves no attempt and writes only if the destination is empty. Normal reservations subsequently refresh idle state within the old fixed deadline. Run during an exclusive cutover.Two Redisson migration cases passed on Redis Cluster on each of the four feature branches. The fixture asserts different source and destination primary IDs and checks the exact deadline, next count, map-wide lifetime, and persistent zero state. The PR workflow now runs these cases in the existing three-primary fixture alongside both J2Cache cluster cases, with executed-test checks. All standalone full builds passed. The two J2Cache cluster-only tests skipped by the PR branch standalone build passed in the separate cluster run.
53f1a1a9f826829ccbf920ec5f22d8d43b3c9152f160009b86112666b6d02bdbb259204e3fb858cc3cfaefefe80403d9eb5da217255d3f5c091270238795c16bf2f3791b129423d54cfa4b54d0aff17fProduction cutover, remaining provider limitations, and branch promotion remain open.
Active native Ehcache 3 retry windows
Native Ehcache 3.6.0 now supports in-place
migrateLegacyWindowfor an exclusive cutover. The original region must already accept both value formats and preserve creation expiry on update. Stop all old and new clients, drain outstanding writes, and use one migration writer per region. Then replace a still-live entry through the existing expiry policy. No retry is consumed by migration. An originally zero counter stays zero until the first actual attempt. Stale resets leave unmigrated values and migrated zero counters intact.Off-heap tests verify the original expiration after conversion, resumed counts, stale resets, and rejection of an AtomicInteger-only region. Separate local probes against a real Terracotta 3.6.0 server used two independent strongly consistent cache managers per line and observed 3 → 4, 0 → 1, and original-window expiry on all four lines.
f60225e7ac4acf58c511b1efd03d00b0e8bf0b1ae9917b186289cf1f955db49526cc652102c33d64f950594af5042c821d2e3e73ac9d0b2a03b54d82983b568b259c2960330feea9e624230156835bcaStandalone builds in each line excluded two J2Cache cluster-only cases. Those cases passed in preceding dedicated GitHub cluster jobs. Native Ehcache regions configured for the legacy value type only or whose policy restarts expiry on updates still require a separate cutover.
Non-UTF-8 J2Cache Redis keys
Legacy Jedis Hash keys and J2Cache Lettuce keys use the writer JVM's default charset. Migration now computes the physical key as bytes. Jedis performs the source expiry script with those bytes. Lettuce supports a separate binary scripting connection for source keys while the existing UTF-8 connection serves the destination. The cutover JVM must use the charset that wrote the source region.
The original Jedis migration failed with an ISO-8859-1 legacy key. The updated standalone test passes and the two Redis Cluster cases passed for every feature line with a verified ISO-8859-1 default charset. They exercise both storage layouts for both providers, assert source and destination placement on different primaries, and compare the original absolute deadline before and after migration. CI now runs a separate ISO-8859-1 regression and requires both tests to execute.
45b558c7c03afd311436c875b4118fc43e362362b21f1c2bb48c2d16d363108e64dc8e9fec351b1844a964bfe3b5ddea1506f70464a7df6950ee6b0da466981c23a092704f7ffe83a28bedc3d009636eThe two cluster-only cases skipped by each standalone build passed in the separate Redis Cluster run.
JCache in-place rollback
With all retry clients paused and pending writes drained,
restoreLegacyWindowconverts an active window in place to the legacyAtomicIntegerformat. It keeps the current count and the original creation deadline. It skips missing, expired and already restored entries. A missing entry does not invoke a JCache read-through loader. A region that accepts only the new value type rejects restore before writing.Two Hazelcast members verified that the old reader can read the restored count and the item expires on its original schedule. The read-through regression first failed against the preceding implementation and passed after the entry-existence check. Both maintenance-line matcher failure regressions were backported as well.
b5d1aeebccf7a84a0ed34e367ca5f6a68b71d78c042fa3979209261ec2a0b806e7c3da78a902f5de375c55a2bf979b92ab54d6a1e2384bc702620e35f30288f5b7ab6e1adbe3dc9837f68458e03ffd53Each hosted Surefire report shows 9 JCache integration checks, 9 matcher checks and both dedicated Redis Cluster checks passed without skips. The standalone counts exclude the two cluster-only cases per line. Legacy-only typed JCache regions and binary-only or authenticated Memcached legacy imports remain separate cutover gates.
Memcached warm-restart verification at
e75b479The current feature head covers authenticated Meta Text import, rejection of a direct import from a binary-only listener, and Java import into a separate destination after a warm restart of a binary-only source. The Memcached 1.6.45 fixture asserts the destination server's actual expiry metadata, the restored count, persistent and expired entries, duplicate import and preservation of the original source. The warm-restart case requires an existing RAM-backed restart file and a clean stop. The source and destination run on loopback.
The exact PR head CI passed. Its Surefire XML records eight Memcached tests with zero failures, errors or skips. The same change includes the Redisson test adjustment to use the observed write interval while retaining exact comparisons against the original stored deadlines. The hosted Redis Cluster checks and the coverage gate passed.
The maintenance heads include this verification for JDK 8, JDK 17, and JDK 21. Each passed all eight Memcached tests locally with its matching JDK. For legacy-only
AtomicIntegerJCache regions, the subtype-based migration and rollback fromd42f632also supersede the earlier cutover note. Deployments must verify they preserve that subtype and the original creation deadline. Binary-only instances without pre-existing warm-restart support still need an authoritative expiry snapshot or a bounded drain. Production cutover and promotion remain open.Maintenance test branches at the verified feature heads
The full hosted workflows passed on all three maintenance feature heads, including the newly required Memcached warm-restart case, the Redis Cluster tests and the coverage gates. Each matching integration branch was fast-forwarded to that verified commit.
7f8bb61d9de2eb0a819b9d891be945fe2520badadf2dbca5c0e782ff1ebfbfd480ecb614f6db21f31df0bdc6663c8c407ba047f888a4085e507238e7The test branches contain the same commits as the feature CI runs above. This records the Git branch promotion. Production cutover remains pending.
Native atomic-counter Ehcache 3 regions
The native Ehcache 3 store accepts an
AtomicInteger-typed region when the serializer preserves the retry-counter subtype. It converts live entries in place under the existing exclusive cutover rules. The original expiry policy must preserve creation expiry, and the source region keeps its existing deadline. Conditional updates compare the serialized counter value and window ID. Legacy-zero counters, duplicate import, concurrent increments and stale resets are covered.Five off-heap integration tests passed locally on the PR head
d8ac321and on all three maintenance lines at162d8e4(JDK 8),6196f46(JDK 17) and3570535(JDK 21). Separate loopback checks on the Ehcache 3.6.0 / Terracotta kit used two independent strong-consistency clients for each line and verified the migrated count, unique concurrent reservations and expiration at the original deadline. A policy that resets expiry on writes still requires its own cutover. These checks used local fixtures.Typed Ehcache 3 hosted verification and integration refs
All four exact feature-head workflows passed. The matching test branches are now fast-forwarded to the verified commits.
d8ac321test/20261119162d8e4test/20261119-1.0.x6196f46test/20261119-2.0.x3570535test/20261119-3.0.xMemcached import from a verified expiry snapshot
migrateLegacyWindowFromSnapshotaccepts the original count and deadline for the same source entry during an exclusive cutover. Zero represents a confirmed persistent entry. The destination preserves the original epoch-second deadline, skips expired entries and uses a conditional add so duplicate imports cannot replace an existing window. A loopback binary-only fixture confirmed that direct metadata reads fail, the snapshot import succeeds, and the original counter CAS stays unchanged. A destination server metadata check confirmed both the original finite deadline and persistent expiration.The exact PR workflow and maintenance workflows for JDK 8, JDK 17 and JDK 21 each executed all nine Memcached tests without skips or errors. The matching test branches contain their verified changes. The separate Shiro 3 integration run also passed with the previously integrated Ehcache 3 module, including its three manager tests.
Production imports require a trusted record of each affected entry's original expiry. A binary-only deployment without warm restart, a trustworthy snapshot or a verified finite bound still needs a cutover decision.
Verify the live source version before copying
The new source-client overload of
migrateLegacyWindowFromSnapshotrejects zero CAS values and uses a read-only binary-compatible check of the source entry's live CAS and decoded count. Missing, replaced and mismatched source entries produce no destination write. The test overwrites an entry with the same count to prove that the old snapshot is rejected. A matching snapshot preserves the original deadline and the source CAS. Duplicate destination imports are rejected.All exact PR, JDK 8, JDK 17, JDK 21 and combined Shiro 3 integration workflows passed. Each run executed all nine Memcached tests without skips or failures. The matching integration refs contain the verified changes.
Cutover still requires exclusive writers, the original process and routing, and a trusted record of the original expiry. The binary protocol supplied version and value verification. Deployment expiry evidence and cutover remain pending.