apache / apache/kvrocks

Check if the replication is correct by the topology in cluster mode

Open
#1,224 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
C++
Stars
4.4k
Forks
658
Avg merge
1d 20h
Merged PRs (30d)
10

Description

### Search before asking

- [X] I had searched in the [issues](https://github.com/apache/incubator-kvrocks/issues) and found no similar issues.

### Motivation

As mentioned in https://github.com/apache/incubator-kvrocks/pull/1219#issuecomment-1376628201, the master can check if the cluster topology is matched by the host and port when receiving the replicate request. It can reduce the risk of the replica connecting to the stale master.

BTW, we can also have a mechanism(configuration) to let users disable this feature.

### Solution

For the replication check, check if the replica's IP and port are in the master replica nodes. And add a configuration to allow users to enable and disable it in flight.

### Are you willing to submit a PR?

- [x] I'm willing to submit a PR!

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading the discussion in PR #1219, then locate the cluster replication request handling and the configuration path. The work is done when the master validates the replica IP and port against the cluster topology and users can enable or disable that check while the system is running.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, redis
Domain
databases, distributed-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.