-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Server-assisted Client-side Caching #3757
Merged
Conversation
This file contains 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
* Code re-use? * Stop forcing to read push notifications before checking cache and remove BCAST * Rename variable * Remove ensureFillSafe() * Refactor peeking and reading push notifications * Cleanup comments
Now we have to mock Protocol#read(RedisInputStream, ClientSideCache) instead of Protocol#read(RedisInputStream).
* Support client side caching from UnifiedJedis * Support client side caching as a separate parameter * format imports * Support CSC in sentinel mode * undo change
* Support TTL in client side caching (using Caffeine library) * Also Guava cache * format pom.xml * Client-side caching by command arguments TODO: Compute hash code. * send keys * todo comment for clean-up * rename method to invalidate * Client-side caching by hashing command arguments * Hash command arguments for CaffeineCSC using OpenHFT hashing * Clean-up keyHashes map * added javadoc * rename method * remove lock * descriptive name * descriptive names and fix * common default values in base class
* Support Client-side caching through URI/URL * check idx of '=' sign * nicer exception * edit/fix condition * rename param * Throw IllegalArgumentException at all such cases
* Create csc package * Create csc.util package * Create a config interface for client-side caching * Default isCacheable * Config to WhiteList/BlackList commands and String keys * Create csc test package(s) * Test white-list/black-list commands and keys * Merge fix * Remove csc.util package * Fix javadoc links * Added ClientSideCacheable interface and removed ClientSideCacheConfig interface * Format imports * Re-create csc.util package * Rename to allow/deny instead of white/black
Changes: 1. CommandLongHashing is renamed to CommandLongHasher. 2. Expanded the names of GuavaCSC (GuavaClientSideCache) and CaffeineCSC (CaffeineClientSideCache).
… testing" This reverts commit 92c09f3.
This reverts and modifies commit 3534996.
* Separate CacheConnection * Introduce CacheKey and CacheEntry * Little tweak maximumSize test in CaffeineClientSideCacheTest * Remove resetting timeout; we'll PING instead
* adding a DataProvider to access connection from cache * resolve keys from commandarguments * clean up in unifiiedjedis and add csc test with ssl * - fix readtimeout exception with sockets for consuming invalidations pending in buffer - apply a default list of cacheable commands to DefaultClientSideCacheable - fix failing unit tests with cacheable / non-cacheable keys - remove formatting changes * - add serialization for cache instances - add unit test with UnifiedJedis - add benchmark for CSC execution - clean unused imports * - added 'Cache' interface and 'DefaultCache' implementation in regard to design doc - added 'EvictionPolicy' interface and LRU implementation - move cache object validation and cache control stuf from 'ClientSideCache' into 'CacheConnection' - make guava and caffeine caches experimental * - added SSLSocketWrapper and plug it to use 'available' - handle exceptions properly - fix some issues with unit tests * implementing thread safety * - fix eviction issue and add related test - fix consuming invalidation messages on a response read - introduce cachestats - fix potential issue with cacheKeysRelatedtoRedisKey cleanup - tests for sequential access, concurrent acces and maxsize * - renmae abstract cache class - add test case for returning new instance of cache object * - change order of execution in sequential acces test * - flush the cache on any disconnect - replace LRU policy references with EvictionPolicy interface - add some constructor overloads to enable custom eviction policies on cache * fix testcache * fix javadoc issue * - fix multithreaded eviction policy issue - update guava and caffeine implementations according to abstract cache
* initial changes * cover tests for JedisPooled and functionality * fix javadoc * cover new tests for JedisCluster and JedisSentineled * Fix CSC allow-and-deny-list and rename Cacheable interface * Tag CommandArguments#getKeys() as Internal * cover lruEvictionTest * Address code reviews and more updates * fix format and more minor changes * format Connection * modify WeakReference usage
* Use ExecutorService.shutdownNow() * More ExecutorService.shutdownNow() and other changes
* caching null results * add more assertion
* add cacheconfig * remove empty file * -modify constructors with cache as public - trim guava caffeine * remove cachetype * - add getCache to UnifiedJedis - add builder method to CacheConfig * add evictionpolicy to cacheconfig * - unifiedjedis constructor with cacheconfig - wrap IOException on protocol read error * fix merge issue --------- Co-authored-by: M Sazzadul Hoque <[email protected]>
Polish #3919 - address some pending change requests - Swap contructor placements - Fix grammar in exception message
* adding cacheclass to cacheconfig * - add cachefactory test * - revert connection ctors to public - udpate some tests with UnifiedJedis.getCache - add ping to flaky tests * remove unnecessary anonymous types * change ctor access modifiers * fix test name * make cachefactory methods static * removing pings due to still flaky with inv messages * - drop CustomCache in tests and use TestCache - check null cacheable issue with defaultcache - support both ctors in custom cache classes regarding to value of cacheconfig.cacheable * remove unncessary maxsize * - remove inline anonymious
This was referenced Sep 16, 2024
* checking server version for CSC * fix format change * fix noauth hello exception in integration tests * fix version check * remove redundant check * remove unused imports * 'toString' for Version * rename to RedisVersion * moving RedisVersion package
uglide
approved these changes
Sep 27, 2024
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.
Resolves #2104