Skip to content

Commit

Permalink
Merge pull request #15784 from a-robinson/cherrypick_15781
Browse files Browse the repository at this point in the history
1.0x cherrypick: storage: Add env var for configuring raft election timeout ticks
  • Loading branch information
a-robinson authored May 9, 2017
2 parents 6e9563a + 6cc3a29 commit 43aa1ed
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pkg/storage/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,8 @@ import (

const (
// rangeIDAllocCount is the number of Range IDs to allocate per allocation.
rangeIDAllocCount = 10
defaultHeartbeatIntervalTicks = 5
defaultRaftElectionTimeoutTicks = 15
rangeIDAllocCount = 10
defaultHeartbeatIntervalTicks = 5
// ttlStoreGossip is time-to-live for store-related info.
ttlStoreGossip = 2 * time.Minute

Expand Down Expand Up @@ -119,6 +118,9 @@ var changeTypeInternalToRaft = map[roachpb.ReplicaChangeType]raftpb.ConfChangeTy
roachpb.REMOVE_REPLICA: raftpb.ConfChangeRemoveNode,
}

var defaultRaftElectionTimeoutTicks = envutil.EnvOrDefaultInt(
"COCKROACH_RAFT_ELECTION_TIMEOUT_TICKS", 15)

var storeSchedulerConcurrency = envutil.EnvOrDefaultInt(
"COCKROACH_SCHEDULER_CONCURRENCY", 8*runtime.NumCPU())

Expand Down

0 comments on commit 43aa1ed

Please sign in to comment.