Skip to content

Commit

Permalink
kvserver: initialize propBuf LAI tracking
Browse files Browse the repository at this point in the history
The initialization of the LAI tracking in the proposal buffer seems
pretty lacking (see #60625). This patch adds initialization of
propBuf.liBase at propBuf.Init() time, which is irrelevant for
production, but will help future tests which will surely want the
a propBuf's first assigned LAIs to have some relationship to the replica
state.

Release note: None
  • Loading branch information
andreimatei committed Feb 16, 2021
1 parent 497a9c0 commit 8fbe6fc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/kv/kvserver/replica_proposal_buf.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ type proposerRaft interface {
func (b *propBuf) Init(p proposer) {
b.p = p
b.full.L = p.rlocker()
b.liBase = p.leaseAppliedIndex()
}

// Len returns the number of proposals currently in the buffer.
Expand Down

0 comments on commit 8fbe6fc

Please sign in to comment.