Skip to content

Commit

Permalink
Rename function
Browse files Browse the repository at this point in the history
  • Loading branch information
justinjc committed Jun 14, 2019
1 parent ad0fd94 commit 5507f80
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/dbnode/integration/disk_cleanup_index_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ import (
"testing"
"time"

"github.com/m3db/m3/src/dbnode/namespace"
"github.com/m3db/m3/src/dbnode/persist/fs"
"github.com/m3db/m3/src/dbnode/retention"
"github.com/m3db/m3/src/dbnode/namespace"
xclock "github.com/m3db/m3/src/x/clock"

"github.com/stretchr/testify/require"
Expand Down
8 changes: 4 additions & 4 deletions src/dbnode/persist/fs/files.go
Original file line number Diff line number Diff line change
Expand Up @@ -980,8 +980,8 @@ func DeleteFileSetAt(filePathPrefix string, namespace ident.ID, shard uint32, bl
return DeleteFiles(fileset.AbsoluteFilepaths)
}

// DataFilePathsBefore returns all the flush data fileset paths whose timestamps are earlier than a given time.
func DataFilePathsBefore(filePathPrefix string, namespace ident.ID, shard uint32, t time.Time) ([]string, error) {
// DataFileSetsBefore returns all the flush data fileset paths whose timestamps are earlier than a given time.
func DataFileSetsBefore(filePathPrefix string, namespace ident.ID, shard uint32, t time.Time) ([]string, error) {
matched, err := filesetFiles(filesetFilesSelector{
fileSetType: persist.FileSetFlushType,
contentType: persist.FileSetDataContentType,
Expand All @@ -996,8 +996,8 @@ func DataFilePathsBefore(filePathPrefix string, namespace ident.ID, shard uint32
return FilesBefore(matched.Filepaths(), t)
}

// IndexFilePathsBefore returns all the flush index fileset paths whose timestamps are earlier than a given time.
func IndexFilePathsBefore(filePathPrefix string, namespace ident.ID, t time.Time) ([]string, error) {
// IndexFileSetsBefore returns all the flush index fileset paths whose timestamps are earlier than a given time.
func IndexFileSetsBefore(filePathPrefix string, namespace ident.ID, t time.Time) ([]string, error) {
matched, err := filesetFiles(filesetFilesSelector{
fileSetType: persist.FileSetFlushType,
contentType: persist.FileSetIndexContentType,
Expand Down
4 changes: 2 additions & 2 deletions src/dbnode/persist/fs/files_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ func TestFileSetFilesBefore(t *testing.T) {

cutoffIter := 8
cutoff := time.Unix(0, int64(cutoffIter))
res, err := DataFilePathsBefore(dir, testNs1ID, shard, cutoff)
res, err := DataFileSetsBefore(dir, testNs1ID, shard, cutoff)
require.NoError(t, err)
require.Equal(t, cutoffIter, len(res))

Expand Down Expand Up @@ -1073,7 +1073,7 @@ func TestIndexFileSetsBefore(t *testing.T) {
}
files.create(t, dir)

results, err := IndexFilePathsBefore(dir, ns1, timeFor(3))
results, err := IndexFileSetsBefore(dir, ns1, timeFor(3))
require.NoError(t, err)
require.Len(t, results, 3)
for _, res := range results {
Expand Down
2 changes: 1 addition & 1 deletion src/dbnode/storage/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ func newNamespaceIndexWithOptions(
bufferFuture: nsMD.Options().RetentionOptions().BufferFuture(),
coldWritesEnabled: nsMD.Options().ColdWritesEnabled(),

indexFilesetsBeforeFn: fs.IndexFilePathsBefore,
indexFilesetsBeforeFn: fs.IndexFileSetsBefore,
deleteFilesFn: fs.DeleteFiles,

newBlockFn: newBlockFn,
Expand Down
2 changes: 1 addition & 1 deletion src/dbnode/storage/shard.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ func newDatabaseShard(
newMergerFn: fs.NewMerger,
newFSMergeWithMemFn: newFSMergeWithMem,
filesetsFn: fs.DataFiles,
filesetPathsBeforeFn: fs.DataFilePathsBefore,
filesetPathsBeforeFn: fs.DataFileSetsBefore,
deleteFilesFn: fs.DeleteFiles,
snapshotFilesFn: fs.SnapshotFiles,
sleepFn: time.Sleep,
Expand Down

0 comments on commit 5507f80

Please sign in to comment.