Repository navigation
Conversation
- treat oversized query keys as optional cache misses - retain backend execution and persistent id encoding - cover ascii and utf8 byte boundaries - preserve normal key lookup and invalidation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3321 +/- ##
============================================
- Coverage 52.63% 52.62% -0.01%
Complexity 2435 2435
============================================
Files 770 770
Lines 67694 67707 +13
Branches 9172 9175 +3
============================================
+ Hits 35631 35632 +1
- Misses 28520 28533 +13
+ Partials 3543 3542 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
- derive a safe UTF-16 bound from the byte limit - encode only query keys in the middle range - preserve RAM and offheap fallback behavior - cover Unicode boundaries and real cache lifecycles
- use the merged launcher and required CI baseline - preserve the constant-time QueryId guard - validate RAM and offheap cache behavior on the new base
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.
Purpose of the PR
A valid 2,500-edge batch update can exceed the off-heap binary key limit and fail before reaching the backend. Oversized query keys now bypass that cache; ordinary short query keys avoid an additional UTF-8 encoding and byte-array allocation in the guard.
Main Changes
ID_LEN_MAX / 3pass immediately, values aboveID_LEN_MAXbypass off-heap caching, and only the middle interval needs a UTF-8 byte-length check.Verifying these changes
The old guard fails the new zero-extra-encoding regression for short keys. Boundary checks cover ASCII, Chinese text and surrogate pairs, including the exact UTF-8 limit and overflow. Real LevelCache regressions cover RAM and off-heap hits, invalidation, misses and backend refetch. Java 17 formatting, clean compilation, the cache test groups and three independent final reviews passed. New-head CI is pending.
The earlier patched service completed two 2,500-edge SUM updates with typed-value and endpoint readback, and rejected a 2,501-edge request without writes. Those receipts belong to the earlier source; this performance supplement does not claim a new live-service run, runtime cache-hit metric, restart or complete C04 acceptance.
Documentation Status
Doc - No Need: internal cache guard optimization; no API, configuration or persistent format change.Implementation illustration
Oversized query keys bypass the off-heap tier so cache misses can reach the backend; short keys avoid UTF-8 encoding in the guard. RAM caching and persistent ID encoding remain unchanged. Source-level behavior illustration, not a runtime or CI result.