[ISSUE #7300] jRaft-Controller Implemention (#7301)

* jRaft-Controller Implemention

* fix bazel build

* reformat code

* remove fury dependence

* fix bazel build

* resolve conflict

* clear code

* Optimize code style

* Optimize code style

* Optimize code style

* revert style only change
fix code style
rollback an unexpected modification.

* Update Producer.java

* chore: move raft startup to start method

* chore: use jraftconfig to collect all configs about jraft

* fix: fix wrong store path because init use string constant

* fix: fix CONTROLLER_NOT_LEADER error in follower

* chore: seperate jraft and controller log

* chore: fix conflict with develop

* chore: add comment to clear the filter logic

* feat: triggerElectMaster will retry when failed

* feat: when controller all restart, we use a timestamp to trace the first heartbeat, avoid to elect again

* fix: implements Serializable to enable snapshot serialize

* fix: use for loop to simple the elect retry

* chore: update jraft version

* chore: opt import

---------

Co-authored-by: leizhiyuan <leizhiyuan@gmail.com>
This commit is contained in:
yulangz
2024-01-29 20:45:20 +08:00
committed by GitHub
co-authored by leizhiyuan
parent 178421386f
commit 8df53dfde8
57 changed files with 2485 additions and 192 deletions
@@ -75,7 +75,7 @@ public class Producer {
/*
* Call send message to deliver message to one of brokers.
*/
SendResult sendResult = producer.send(msg);
SendResult sendResult = producer.send(msg, 20 * 1000);
/*
* There are different ways to send message, if you don't care about the send result,you can use this way
* {@code