Skip to content

Commit

Permalink
Rename compactionPicker.pick to compactionPicker.pickAuto
Browse files Browse the repository at this point in the history
  • Loading branch information
petermattis committed Nov 29, 2018
1 parent 3d6cc19 commit 2686a7c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion compaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ func (d *DB) compact1() (err error) {
manual.done <- err
}()
} else {
c = d.mu.versions.picker.pick(d.opts)
c = d.mu.versions.picker.pickAuto(d.opts)
}
if c == nil {
return nil
Expand Down
4 changes: 2 additions & 2 deletions compaction_picker.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,8 @@ func (p *compactionPicker) initTarget(v *version, opts *db.Options) {
// snapshot.
}

// pick picks the best compaction, if any.
func (p *compactionPicker) pick(opts *db.Options) (c *compaction) {
// pickAuto picks the best compaction, if any.
func (p *compactionPicker) pickAuto(opts *db.Options) (c *compaction) {
if !p.compactionNeeded() {
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion compaction_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ func TestPickCompaction(t *testing.T) {
vs.picker = &tc.picker
vs.picker.vers = &tc.version

c, got := vs.picker.pick(opts), ""
c, got := vs.picker.pickAuto(opts), ""
if c != nil {
got0 := fileNums(c.inputs[0])
got1 := fileNums(c.inputs[1])
Expand Down

0 comments on commit 2686a7c

Please sign in to comment.