kvrocks icon indicating copy to clipboard operation
kvrocks copied to clipboard

add semi sync function for kvrocks

Open popunit opened this issue 3 years ago • 7 comments

Added a basic infrastructure code to kvrocks in order to support semi sync function.

Config change: semi-sync-enable (yes/no) : open/close the semi sync function. semi-sync-wait-for-slave-count (Integer): set how many slaves should response an action at least.

The PR only includes how to handle multi ack on local. In this situation, a write transaction will return when put replication data into write buffer. We can extend the function to wait until slaves send ack back actually in future.

popunit avatar May 19 '21 09:05 popunit

cool~ @bitleak/kvrocks-core-team

git-hulk avatar May 19 '21 09:05 git-hulk

Many thanks for @popunit contributing the amazing PR, I think we shouldn't emit any events when the semi-sync was disabled, since too many events may affect the performance.

git-hulk avatar May 22 '21 08:05 git-hulk

src/semisync_master.cc && src/semisync_master.h is needed in CMakeLists.txt target_sources

karelrooted avatar May 24 '21 05:05 karelrooted

@popunit truly thanks for your PR, but so big PR, it is hard to review, could you mind write your design and implementation details?

ShooterIT avatar May 26 '21 03:05 ShooterIT

@popunit truly thanks for your PR, but so big PR, it is hard to review, could you mind write your design and implementation details?

sorry, my fault to close just now. i reopen again. @ShooterIT ok, i have one but without details, i need to take some time to complete.

popunit avatar May 26 '21 03:05 popunit

@popunit truly thanks for your PR, but so big PR, it is hard to review, could you mind write your design and implementation details?

sorry, my fault to close just now. i reopen again. @ShooterIT ok, i have one but without details, i need to take some time to complete.

TRocks Semi-Sync.pdf @ShooterIT i wrote a version but it's not detailed enough. you guys can review it first. i'm gonna fix code follow suggestion later

popunit avatar May 26 '21 13:05 popunit

update pr

popunit avatar May 27 '21 11:05 popunit

Closed as stale.

Sorry that we don't catch up on this patch timely. @popunit you're welcome to propose the changes again based on the nightly unstable branch.

tisonkun avatar Aug 16 '22 14:08 tisonkun