-
Notifications
You must be signed in to change notification settings - Fork 24
Persistent Cache Implementation using RocksDB #198
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
base: master
Are you sure you want to change the base?
Conversation
…ementation, and refactor `InMemoryCache` to implement interface. (cherry picked from commit 14e284a)
(cherry picked from commit 3fb06b5)
…e connector (cherry picked from commit 6a61963)
…ching (cherry picked from commit 75d91f7)
(cherry picked from commit b1a617f)
(cherry picked from commit dc72d73)
(cherry picked from commit 1d1a1f7)
…ksDB (cherry picked from commit 618c993)
(cherry picked from commit e3d7973)
(cherry picked from commit 9788b47)
(cherry picked from commit b86be91)
@@ -33,7 +33,7 @@ jobs: | |||
needs: build | |||
name: Test | |||
runs-on: ubuntu-latest | |||
timeout-minutes: 120 | |||
timeout-minutes: 360 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
360 minutes is too high. Why don't we make it 180.
cc: @srinath-ctds
@@ -24,6 +24,7 @@ kafkaVersion=3.4.0 | |||
vavrVersion=0.10.3 | |||
testContainersVersion=1.19.1 | |||
caffeineVersion=2.8.8 | |||
rocksdbVersion=9.4.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for Info, Why specifically 9.4.0
?
@@ -34,7 +34,7 @@ public class ChaosNetworkContainer<SELF extends ChaosNetworkContainer<SELF>> ext | |||
|
|||
public ChaosNetworkContainer(String targetContainer, String pause) { | |||
super(PUMBA_IMAGE); | |||
setCommand("--log-level debug netem --tc-image gaiadocker/iproute2 --duration " + pause + " loss --percent 100 " + targetContainer); | |||
setCommand("--log-level debug netem --tc-image ghcr.io/alexei-led/pumba-debian-nettools --duration " + pause + " loss --percent 100 " + targetContainer); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add why this change is made in the PR description.
@@ -66,6 +66,8 @@ public class CassandraSourceConnectorConfig { | |||
public static final String CACHE_MAX_DIGESTS_CONFIG = "cache.max.digest"; | |||
public static final String CACHE_MAX_CAPACITY_CONFIG = "cache.max.capacity"; | |||
public static final String CACHE_EXPIRE_AFTER_MS_CONFIG = "cache.expire.after.ms"; | |||
public static final String CACHE_PERSISTENT_DIRECTORY_CONFIG = "cache.persistent.directory"; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the extra line necessary for formatting checks? If not, please remove
|
||
import java.util.List; | ||
|
||
public interface MutationCache<K> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interface level description on what this cache will be used for. (de-duplication)
* Keep MD5 digests to deduplicate Cassandra mutations | ||
*/ | ||
public class MutationCache<K> { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add @Override
annotation to the methods getting implemented from the interface in both the classes.
Types of changes
Description
The Pull request implements Persistent Cache with RocksDB.
The implementation uses an in-memory cache mechanism using Caffeine and a Write-through persistent cache based on RocksDB.
Fixes
cache.max.capacity
) being "processed" in a very short period of time, this can occur on high loads on the in-memory cache, causing eviction and duplication in the data topic.What's added/changed
PersistentCache.java
which implements theMutationCache.java
interface, having the persistent cache implementation.cache.persistent.directory
to enable the persistent cache and set the cache directory at the same time.MutationCache.java
toInMemory.java
, which has a non-persistent in-memory cache implementation.Checklist: