Skip to content

Commit

Permalink
kv: include lease epoch in RangeInfo.CTEntry
Browse files Browse the repository at this point in the history
Should help with debugging.
  • Loading branch information
nvanbenschoten committed May 19, 2020
1 parent 94e3e2f commit 3c0de0f
Show file tree
Hide file tree
Showing 3 changed files with 101 additions and 68 deletions.
3 changes: 2 additions & 1 deletion pkg/kv/kvserver/replica.go
Original file line number Diff line number Diff line change
Expand Up @@ -1025,8 +1025,9 @@ func (r *Replica) State() storagepb.RangeInfo {
}
if ri.NewestClosedTimestamp.ClosedTimestamp.Less(e.ClosedTimestamp) {
ri.NewestClosedTimestamp.NodeID = replDesc.NodeID
ri.NewestClosedTimestamp.MLAI = int64(mlai)
ri.NewestClosedTimestamp.ClosedTimestamp = e.ClosedTimestamp
ri.NewestClosedTimestamp.MLAI = int64(mlai)
ri.NewestClosedTimestamp.Epoch = int64(e.Epoch)
}
return true // done
})
Expand Down
165 changes: 98 additions & 67 deletions pkg/kv/kvserver/storagepb/state.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pkg/kv/kvserver/storagepb/state.proto
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ message RangeInfo {
(gogoproto.casttype) = "github.com/cockroachdb/cockroach/pkg/roachpb.NodeID"];
util.hlc.Timestamp closed_timestamp = 2 [(gogoproto.nullable) = false];
int64 mlai = 3 [(gogoproto.customname) = "MLAI"];
int64 epoch = 4;
}
// The highest closed timestamp known to have data for this replica, taken
// across the data received from all nodes. This does not reflect whether
Expand Down

0 comments on commit 3c0de0f

Please sign in to comment.