forked from TrueCloudLab/frostfs-node
[#373] metabase: Add metrics
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
f54cc0b607
commit
059e9e88a2
39 changed files with 379 additions and 96 deletions
|
@ -1,6 +1,7 @@
|
|||
package engine
|
||||
|
||||
import (
|
||||
"context"
|
||||
"math/rand"
|
||||
"sort"
|
||||
|
||||
|
@ -96,7 +97,7 @@ func (l ListWithCursorRes) Cursor() *Cursor {
|
|||
//
|
||||
// Returns ErrEndOfListing if there are no more objects to return or count
|
||||
// parameter set to zero.
|
||||
func (e *StorageEngine) ListWithCursor(prm ListWithCursorPrm) (ListWithCursorRes, error) {
|
||||
func (e *StorageEngine) ListWithCursor(ctx context.Context, prm ListWithCursorPrm) (ListWithCursorRes, error) {
|
||||
result := make([]objectcore.AddressWithType, 0, prm.count)
|
||||
|
||||
// Set initial cursors
|
||||
|
@ -142,7 +143,7 @@ func (e *StorageEngine) ListWithCursor(prm ListWithCursorPrm) (ListWithCursorRes
|
|||
shardPrm.WithCount(count)
|
||||
shardPrm.WithCursor(cursor.getCurrentShardCursor())
|
||||
|
||||
res, err := shardInstance.ListWithCursor(shardPrm)
|
||||
res, err := shardInstance.ListWithCursor(ctx, shardPrm)
|
||||
if err != nil {
|
||||
cursor.setShardRead(curr)
|
||||
continue
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue