Repository navigation
[ISSUE #7444] Deprecate unused memory-safe lru map. - #7553
Merged
Merged
Conversation
Aias00
approved these changes
Oct 12, 2026
Aias00
left a comment
Contributor
There was a problem hiding this comment.
Review: Deprecate unused memory-safe lru map (#7444)
Approving. Clean, purely additive deprecation — no behavioral or API change.
What I verified:
MemorySafeLRUMapis annotated@Deprecated(since = "2.7.2")and the class Javadoc now documents the deprecation, the retention-for-compatibility guarantee (public constructors, serialization id, and behavior preserved; no removal scheduled without a public API review), and concrete migration guidance towardWindowTinyLFUMapwith an explicit maximum entry count.- The RELEASE-NOTES entry is placed under API Changes and correctly emphasizes the key caveat: the old
maxFreeMemoryargument is a free-memory threshold in bytes, not an entry count, so migrating callers must choose an entry-count working set;WindowTinyLFUMapdoes not implement the memory-pressure threshold. - No source or binary compatibility is broken; down-stream code keeps compiling and running unchanged.
Non-blocking suggestion: when the eventual removal is planned, a quick rg sweep of the repo (and the shenyu-examples* / shenyu-web modules) for MemorySafeLRUMap usages would let you pre-file a migration PR for internal callers rather than bundling it with the removal. Not required now.
Merging.
moremind
approved these changes
Oct 12, 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.
MemorySafeLRUMaphas no repository-local production callers, but it is still a publicshenyu-commonAPI. Deprecate it since 2.7.2 while retaining its constructors, serialization identifier, implementation and dedicated tests for downstream source and binary compatibility. Public code search also finds historical ShenYu copies and callers; that evidence cannot rule out private or binary-only consumers.Add an Unreleased API note with migration guidance for the existing
WindowTinyLFUMap: choose an explicit maximum entry count and review the different eviction policy, non-null keys/values and Map API surface. The old free-memory threshold is measured in bytes and is not an entry-count setting. Keep memory-pressure-dependent consumers on the compatibility implementation until an equivalent policy is chosen. No removal release is scheduled; future removal needs compatibility review and advance notice.Fixes #7444.
Validation
shenyu-commonsuite: 498 tests, zero failures/errors, one existing skipped test (497 passed), including the retained LRU, WindowTinyLFU and memory-limit tests.javap -publicsignatures match the previously installed 2.7.2-SNAPSHOT artifact.git diff --checkpasses../mvnw -B -ntp -pl shenyu-common -Djacoco.skip=true test javadoc:javadoc apache-rat:checkMake sure that:
./mvnw clean install -Dmaven.javadoc.skip=true. The full affected-module validation is recorded above; the full repository build was not run.