Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backport-2.0: storage: lower the raft-log queue timer from 50ms to 0ms #23884

Merged
merged 1 commit into from Mar 15, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 3 additions & 5 deletions pkg/storage/raft_log_queue.go
Expand Up @@ -32,10 +32,8 @@ import (
)

const (
// RaftLogQueueTimerDuration is the duration between truncations. This needs
// to be relatively short so that truncations can keep up with raft log entry
// creation.
RaftLogQueueTimerDuration = 50 * time.Millisecond
// raftLogQueueTimerDuration is the duration between truncations.
raftLogQueueTimerDuration = 0 // zero duration to process truncations greedily
// RaftLogQueueStaleThreshold is the minimum threshold for stale raft log
// entries. A stale entry is one which all replicas of the range have
// progressed past and thus is no longer needed and can be truncated.
Expand Down Expand Up @@ -273,7 +271,7 @@ func (rlq *raftLogQueue) process(ctx context.Context, r *Replica, _ config.Syste

// timer returns interval between processing successive queued truncations.
func (*raftLogQueue) timer(_ time.Duration) time.Duration {
return RaftLogQueueTimerDuration
return raftLogQueueTimerDuration
}

// purgatoryChan returns nil.
Expand Down