Skip to content

Commit

Permalink
[WIP] sql,kv: add compact_engine_span for internal use
Browse files Browse the repository at this point in the history
This sql builtin can be used to compact the key span for a
given (nodeID, storeID, rangeID), on a running node.

This is incomplete:
- there is a TODO to figure out how to convert from the
  rangeID to the range span in planner.go
- there are no tests.

Informs ##26068

Release note: None
  • Loading branch information
sumeerbhola committed Dec 8, 2020
1 parent 557bc72 commit c8a2110
Show file tree
Hide file tree
Showing 12 changed files with 554 additions and 80 deletions.
5 changes: 5 additions & 0 deletions pkg/kv/kvclient/kvcoord/dist_sender.go
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,11 @@ func (ds *DistSender) FirstRange() (*roachpb.RangeDescriptor, error) {
return ds.firstRangeProvider.GetFirstRangeDescriptor()
}

// NodeDialer returns a Dialer.
func (ds *DistSender) NodeDialer() *nodedialer.Dialer {
return ds.nodeDialer
}

// getNodeID attempts to return the local node ID. It returns 0 if the DistSender
// does not have access to the Gossip network.
func (ds *DistSender) getNodeID() roachpb.NodeID {
Expand Down
Loading

0 comments on commit c8a2110

Please sign in to comment.