Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove StorageID from committed.iterator #8824

Merged
merged 1 commit into from
Mar 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions pkg/graveler/committed/iterator.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,16 @@ type iterator struct {
rng *Range // Decoded value at which rangeIt point
it graveler.ValueIterator // nil at start of range
err error
storageID StorageID
namespace Namespace
beforeRange bool
}

func NewIterator(ctx context.Context, manager RangeManager, storageID StorageID, namespace Namespace, rangesIt ValueIterator) Iterator {
func NewIterator(ctx context.Context, manager RangeManager, namespace Namespace, rangesIt ValueIterator) Iterator {
return &iterator{
ctx: ctx,
manager: manager,
namespace: namespace,
rangesIt: rangesIt,
storageID: storageID,
}
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/graveler/committed/iterator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ func TestIterator(t *testing.T) {
lastKey = key
}
rangesIt := testutil.NewCommittedValueIteratorFake(makeRangeRecords(tt.PK))
pvi := committed.NewIterator(ctx, manager, "", namespace, rangesIt)
pvi := committed.NewIterator(ctx, manager, namespace, rangesIt)
defer pvi.Close()
assert.Equal(t, tt.PK, keysByRanges(t, pvi))
assert.False(t, pvi.NextRange())
Expand All @@ -201,7 +201,7 @@ func TestIterator(t *testing.T) {
lastKey = key
}
rangesIt := testutil.NewCommittedValueIteratorFake(makeRangeRecords(tt.PK))
pvi := committed.NewIterator(ctx, manager, "", namespace, rangesIt)
pvi := committed.NewIterator(ctx, manager, namespace, rangesIt)
defer pvi.Close()

if len(tt.PK) == 0 {
Expand Down
2 changes: 1 addition & 1 deletion pkg/graveler/committed/meta_range_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func (m *metaRangeManager) NewMetaRangeIterator(ctx context.Context, ns graveler
if err != nil {
return nil, fmt.Errorf("manage metarange %s: %w", metaRangeID, err)
}
return NewIterator(ctx, m.rangeManager, StorageID(m.storageID), Namespace(ns), rangesIt), nil
return NewIterator(ctx, m.rangeManager, Namespace(ns), rangesIt), nil
}

func (m *metaRangeManager) GetMetaRangeURI(ctx context.Context, id graveler.MetaRangeID) (string, error) {
Expand Down
Loading