after posting values for a specific key, query of its value returns unexpected response: the number of nodes is 1, which means there is no replica
What is expected: the latest value of the key
What is specific: only one (the local) redis is set up
How to reproduce
- set up the local redis server, e.g. listening at 127.0.0.1:16378
- modify config.json file accordingly like below
{
"ConsistentHash": "rendezvous",
"BucketSize": 10,
"ReplicaNum": 1,
"StoreType": "redis",
"Concurrent": true,
"Stores": [
{
"RegionType": "local",
"Name": "store1",
"Host": "127.0.0.1",
"Port": 16378
}
]
}
- start rkv server
- run command to post value of key
curl -X POST 127.0.0.1:8090/kv -d '{"key":"testk", "value":"testv"}'; notice the response is The key value pair (testk,testv) has been saved as revision 6 at 127.0.0.1:16378, assuming success
- run command to get back its value
curl 127.0.0.1:8090/kv?key=testk
the response is
the number of nodes is 1, which means there is no replica