forked from deepfabric/elasticell
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdebug.patch
40 lines (38 loc) · 3.04 KB
/
debug.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
diff --git a/cmd/cell/cell.go b/cmd/cell/cell.go
index 2eab324..0552720 100644
--- a/cmd/cell/cell.go
+++ b/cmd/cell/cell.go
@@ -56,14 +56,14 @@ var (
// raftstore
cellCapacityMB = flag.Uint64("capacity-cell", 0, "Capacity(MB): cell")
- intervalHeartbeatStore = flag.Int("interval-heartbeat-store", 10, "Interval(sec): Store heartbeat")
- intervalHeartbeatCell = flag.Int("interval-heartbeat-cell", 30, "Interval(sec): Cell heartbeat")
+ intervalHeartbeatStore = flag.Int("interval-heartbeat-store", 1, "Interval(sec): Store heartbeat")
+ intervalHeartbeatCell = flag.Int("interval-heartbeat-cell", 3, "Interval(sec): Cell heartbeat")
intervalSplitCheck = flag.Int("interval-split-check", 10, "Interval(sec): Split check")
intervalCompact = flag.Int("interval-compact", 10, "Interval(sec): Compact raft log")
intervalReportMetric = flag.Int("interval-report-metric", 10, "Interval(sec): Report cell metric")
intervalRaftTick = flag.Int("interval-raft-tick", 1000, "Interval(ms): Raft tick")
intervalRetrySentSnapshot = flag.Int("interval-retry-sent-snapshot", 10, "Interval(sec): Retry sent snapshot")
- limitPeerDown = flag.Uint64("limit-peer-down", 5*60, "Limit(sec): Max peer downtime")
+ limitPeerDown = flag.Uint64("limit-peer-down", 10, "Limit(sec): Max peer downtime")
limitCompactCount = flag.Uint64("limit-compact-count", 0, "Limit: Count of raft logs, if reach this limit, leader will compact [first,applied], otherwise [first, minimum replicated]")
limitCompactBytesMB = flag.Uint64("limit-compact-bytes", 0, "Limit(MB): Total bytes of raft logs, if reach this limit, leader will compact [first,applied], otherwise [first, minimum replicated]")
limitCompactLag = flag.Uint64("limit-compact-lag", 0, "Limit: Max count of lag log, leader will compact [first, compact - lag], avoid send snapshot file to a little lag peer")
@@ -179,7 +179,7 @@ func parseCfg() *server.Cfg {
cfg.BufferCliWrite = *bufferCliWrite
cfg.BatchCliResps = *batchCliResps
- cfg.Node.RaftStore.CellCapacity = *cellCapacityMB * mb
+ cfg.Node.RaftStore.CellCapacity = *cellCapacityMB * kb
cfg.Node.RaftStore.DurationHeartbeatStore = time.Second * time.Duration(*intervalHeartbeatStore)
cfg.Node.RaftStore.DurationHeartbeatCell = time.Second * time.Duration(*intervalHeartbeatCell)
cfg.Node.RaftStore.DurationSplitCheck = time.Second * time.Duration(*intervalSplitCheck)
@@ -198,7 +198,7 @@ func parseCfg() *server.Cfg {
cfg.Node.RaftStore.LimitSnapChunkRate = *limitSnapChunkRate
cfg.Node.RaftStore.LimitConcurrencyWrite = *limitConcurrencyWrite
cfg.Node.RaftStore.ThresholdCompact = *thresholdCompact
- cfg.Node.RaftStore.ThresholdSplitCheckBytes = *thresholdSplitCheckMB * mb
+ cfg.Node.RaftStore.ThresholdSplitCheckBytes = *thresholdSplitCheckMB * kb
cfg.Node.RaftStore.ThresholdRaftElection = *thresholdRaftElection
cfg.Node.RaftStore.ThresholdRaftHeartbeat = *thresholdRaftHeartbeat
cfg.Node.RaftStore.BatchSizeProposal = *batchSizeProposal