MCPcopy Create free account
hub / github.com/e2wugui/zeze / tryStartSplit

Method tryStartSplit

ZezeJava/ZezeJava/src/main/java/Zeze/Dbh2/Dbh2.java:469–481  ·  view source on GitHub ↗
(boolean isMove)

Source from the content-addressed store, hash-verified

467 }
468
469 public void tryStartSplit(boolean isMove) throws Exception {
470 if (!raft.isLeader())
471 return;
472
473 var bucket = stateMachine.getBucket();
474 var splitting = bucket.getSplittingMeta();
475 if (null != splitting) {
476 logger.info("start but in splitting or ending. {}->{}", formatMeta(bucket.getBucketMeta()), formatMeta(splitting));
477 return; // splitting
478 }
479
480 startSplit(isMove);
481 }
482
483 private void onFollowerReceiveKeepAlive() {
484 // 集群中的leader已经开始工作。自己是follower.

Callers 1

loadMonitorMethod · 0.95

Calls 6

formatMetaMethod · 0.95
startSplitMethod · 0.95
getBucketMethod · 0.80
getSplittingMetaMethod · 0.80
getBucketMetaMethod · 0.80
isLeaderMethod · 0.45

Tested by

no test coverage detected