Replies: 2 comments 4 replies
-
I can only assume that the write updates from master didn't reach the replica(s). |
Beta Was this translation helpful? Give feedback.
-
The replication of M => R is asynchronous. you can try this congfigure.
If the slave node replicates data and the ACK delay is too long, the master node considers that too much data may be lost after the master node breaks down and rejects the write request. |
Beta Was this translation helpful? Give feedback.
-
console.log
java version 1.8
jedis version 4.4.0-rc1
I am facing issue while writing 100 demo objects into the Redis database with transaction with a delay of Thread.sleep(1800L) after each write. During this write operation, I deleted the master instance of Redis for a high availability test, but I observed data loss during this write operation.out of 100, 98 objects written in to redis db.
The log file shows that the commit result for Key19 and Key69 is OK, but I do not see these keys in the Redis database. The Redis master-slave environment is deployed on Kubernetes pods, with Redis Sentinel for automatic failover-handling for high availability.
I am attaching the log file and java files
Transaction-Issue.zip
for your reference. Please let me know what is going wrong here.
Java Code which writes Demo objects
`package com.test.ha;
public class TestHa {
}
class Demo
{
String value;
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public Demo(String value) {
super();
this.value = value;
}
}`
Thank you in advance for your help.
Beta Was this translation helpful? Give feedback.
All reactions