github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/base/constants.go (about) 1 // Copyright 2016 The Cockroach Authors. 2 // 3 // Use of this software is governed by the Business Source License 4 // included in the file licenses/BSL.txt. 5 // 6 // As of the Change Date specified in that file, in accordance with 7 // the Business Source License, use of this software will be governed 8 // by the Apache License, Version 2.0, included in the file 9 // licenses/APL.txt. 10 11 package base 12 13 import "time" 14 15 const ( 16 // DefaultMaxClockOffset is the default maximum acceptable clock offset value. 17 // On Azure, clock offsets between 250ms and 500ms are common. On AWS and GCE, 18 // clock offsets generally stay below 250ms. See comments on Config.MaxOffset 19 // for more on this setting. 20 DefaultMaxClockOffset = 500 * time.Millisecond 21 22 // DefaultTxnHeartbeatInterval is how often heartbeats are sent from the 23 // transaction coordinator to a live transaction. These keep it from 24 // being preempted by other transactions writing the same keys. If a 25 // transaction fails to be heartbeat within 5x the heartbeat interval, 26 // it may be aborted by conflicting txns. 27 DefaultTxnHeartbeatInterval = 1 * time.Second 28 29 // SlowRequestThreshold is the amount of time to wait before considering a 30 // request to be "slow". 31 SlowRequestThreshold = 60 * time.Second 32 33 // ChunkRaftCommandThresholdBytes is the threshold in bytes at which 34 // to chunk or otherwise limit commands being sent to Raft. 35 ChunkRaftCommandThresholdBytes = 256 * 1000 36 37 // HeapProfileDir is the directory name where the heap profiler stores profiles 38 // when there is a potential OOM situation. 39 HeapProfileDir = "heap_profiler" 40 41 // GoroutineDumpDir is the directory name where the goroutine dumper 42 // stores dump when one of the dump heuristics is triggered. 43 GoroutineDumpDir = "goroutine_dump" 44 45 // MinRangeMaxBytes is the minimum value for range max bytes. 46 MinRangeMaxBytes = 64 << 10 // 64 KB 47 )