update irreparableDB.GetLimited query to use where instead of offset (#2585)

* update query to use where instead of offset, update tests

* update cmd/inspector irreparable

* add comment for offset
This commit is contained in:
Jess G 2019-07-18 09:21:21 -07:00 committed by GitHub
parent 91f0adef10
commit 3af9250659
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 193 additions and 169 deletions

View File

@ -553,22 +553,25 @@ func getSegments(cmd *cobra.Command, args []string) error {
if err != nil {
return ErrInspectorDial.Wrap(err)
}
length := irreparableLimit
var offset int32
var lastSeenSegmentPath = []byte{}
// query DB and paginate results
for length >= irreparableLimit {
res, err := i.irrdbclient.ListIrreparableSegments(context.Background(), &pb.ListIrreparableSegmentsRequest{Limit: irreparableLimit, Offset: offset})
for {
req := &pb.ListIrreparableSegmentsRequest{
Limit: irreparableLimit,
LastSeenSegmentPath: lastSeenSegmentPath,
}
res, err := i.irrdbclient.ListIrreparableSegments(context.Background(), req)
if err != nil {
return ErrRequest.Wrap(err)
}
objects := sortSegments(res.Segments)
if len(objects) == 0 {
if len(res.Segments) == 0 {
break
}
lastSeenSegmentPath = res.Segments[len(res.Segments)-1].Path
objects := sortSegments(res.Segments)
// format and print segments
enc := json.NewEncoder(os.Stdout)
enc.SetIndent("", " ")
@ -577,9 +580,7 @@ func getSegments(cmd *cobra.Command, args []string) error {
return err
}
length = int32(len(res.Segments))
offset += length
length := int32(len(res.Segments))
if length >= irreparableLimit {
if !prompt.Confirm("\nNext page? (y/n)") {
break

View File

@ -251,30 +251,32 @@ func (checker *Checker) updateSegmentStatus(ctx context.Context, pointer *pb.Poi
return nil
}
// IrreparableProcess picks items from irreparabledb and add them to the repair
// worker queue if they, now, can be repaired.
// IrreparableProcess iterates over all items in the irreparabledb. If an item can
// now be repaired then it is added to a worker queue.
func (checker *Checker) IrreparableProcess(ctx context.Context) (err error) {
defer mon.Task()(&ctx)(&err)
limit := 1
var offset int64
const limit = 1000
lastSeenSegmentPath := []byte{}
for {
seg, err := checker.irrdb.GetLimited(ctx, limit, offset)
segments, err := checker.irrdb.GetLimited(ctx, limit, lastSeenSegmentPath)
if err != nil {
return Error.New("error reading segment from the queue %s", err)
}
// zero segments returned with nil err
if len(seg) == 0 {
if len(segments) == 0 {
break
}
err = checker.updateSegmentStatus(ctx, seg[0].GetSegmentDetail(), string(seg[0].GetPath()), &durabilityStats{})
if err != nil {
checker.logger.Error("irrepair segment checker failed: ", zap.Error(err))
lastSeenSegmentPath = segments[len(segments)-1].Path
for _, segment := range segments {
err = checker.updateSegmentStatus(ctx, segment.GetSegmentDetail(), string(segment.GetPath()), &durabilityStats{})
if err != nil {
checker.logger.Error("irrepair segment checker failed: ", zap.Error(err))
}
}
offset++
}
return nil

View File

@ -30,13 +30,13 @@ func TestIdentifyInjuredSegments(t *testing.T) {
checker.Loop.Stop()
//add noise to metainfo before bad record
for x := 0; x < 1000; x++ {
for x := 0; x < 10; x++ {
makePointer(t, planet, fmt.Sprintf("a-%d", x), false)
}
//create piece that needs repair
makePointer(t, planet, fmt.Sprintf("b"), true)
//add more noise to metainfo after bad record
for x := 0; x < 1000; x++ {
for x := 0; x < 10; x++ {
makePointer(t, planet, fmt.Sprintf("c-%d", x), false)
}
err := checker.IdentifyInjuredSegments(ctx)

View File

@ -28,7 +28,11 @@ func NewInspector(irrdb DB) *Inspector {
// ListIrreparableSegments returns a number of irreparable segments by limit and offset
func (srv *Inspector) ListIrreparableSegments(ctx context.Context, req *pb.ListIrreparableSegmentsRequest) (_ *pb.ListIrreparableSegmentsResponse, err error) {
defer mon.Task()(&ctx)(&err)
segments, err := srv.irrdb.GetLimited(ctx, int(req.GetLimit()), int64(req.GetOffset()))
last := req.GetLastSeenSegmentPath()
if len(req.GetLastSeenSegmentPath()) == 0 {
last = []byte{}
}
segments, err := srv.irrdb.GetLimited(ctx, int(req.GetLimit()), last)
if err != nil {
return nil, err
}

View File

@ -15,8 +15,8 @@ type DB interface {
IncrementRepairAttempts(ctx context.Context, segmentInfo *pb.IrreparableSegment) error
// Get returns irreparable segment info based on segmentPath.
Get(ctx context.Context, segmentPath []byte) (*pb.IrreparableSegment, error)
// GetLimited number of segments from offset
GetLimited(ctx context.Context, limit int, offset int64) ([]*pb.IrreparableSegment, error)
// GetLimited returns a list of irreparable segment info starting after the last segment info we retrieved
GetLimited(ctx context.Context, limit int, lastSeenSegmentPath []byte) ([]*pb.IrreparableSegment, error)
// Delete removes irreparable segment info based on segmentPath.
Delete(ctx context.Context, segmentPath []byte) error
}

View File

@ -41,31 +41,35 @@ func TestIrreparable(t *testing.T) {
require.NoError(t, err)
}
{ // GetLimited limit 1, offset 0
segs, err := irrdb.GetLimited(ctx, 1, 0)
{ // GetLimited limit 1, starting from the beginning
lastSeenSegmentPath := []byte{}
segs, err := irrdb.GetLimited(ctx, 1, lastSeenSegmentPath)
require.NoError(t, err)
require.Equal(t, 1, len(segs))
require.Empty(t, cmp.Diff(segments[0], segs[0], cmp.Comparer(pb.Equal)))
}
{ // GetLimited limit 1, offset 1
segs, err := irrdb.GetLimited(ctx, 1, 1)
{ // GetLimited limit 1, starting after the first item
lastSeenSegmentPath := []byte(strconv.Itoa(0))
segs, err := irrdb.GetLimited(ctx, 1, lastSeenSegmentPath)
require.NoError(t, err)
require.Equal(t, 1, len(segs))
require.Empty(t, cmp.Diff(segments[1], segs[0], cmp.Comparer(pb.Equal)))
}
{ // GetLimited limit 2, offset 0
segs, err := irrdb.GetLimited(ctx, 2, 0)
{ // GetLimited limit 2, starting from the beginning
lastSeenSegmentPath := []byte{}
segs, err := irrdb.GetLimited(ctx, 2, lastSeenSegmentPath)
require.NoError(t, err)
require.Equal(t, 2, len(segs))
require.Empty(t, cmp.Diff(segments[0], segs[0], cmp.Comparer(pb.Equal)))
require.Empty(t, cmp.Diff(segments[1], segs[1], cmp.Comparer(pb.Equal)))
}
{ // GetLimited limit 2, offset 1
segs, err := irrdb.GetLimited(ctx, 2, 1)
{ // GetLimited limit 2, starting after the first item
lastSeenSegmentPath := []byte(strconv.Itoa(0))
segs, err := irrdb.GetLimited(ctx, 2, lastSeenSegmentPath)
require.NoError(t, err)
require.Equal(t, 2, len(segs))
require.Empty(t, cmp.Diff(segments[1], segs[0], cmp.Comparer(pb.Equal)))
@ -73,8 +77,9 @@ func TestIrreparable(t *testing.T) {
}
{ // GetLimited limit 3, offset 1
segs, err := irrdb.GetLimited(ctx, 3, 1)
{ // GetLimited limit 3, starting after the first item
lastSeenSegmentPath := []byte(strconv.Itoa(0))
segs, err := irrdb.GetLimited(ctx, 3, lastSeenSegmentPath)
require.NoError(t, err)
require.Equal(t, 2, len(segs))
require.Empty(t, cmp.Diff(segments[1], segs[0], cmp.Comparer(pb.Equal)))

View File

@ -30,7 +30,7 @@ const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
// ListSegments
type ListIrreparableSegmentsRequest struct {
Limit int32 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"`
Offset int32 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
LastSeenSegmentPath []byte `protobuf:"bytes,2,opt,name=last_seen_segment_path,json=lastSeenSegmentPath,proto3" json:"last_seen_segment_path,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -67,11 +67,11 @@ func (m *ListIrreparableSegmentsRequest) GetLimit() int32 {
return 0
}
func (m *ListIrreparableSegmentsRequest) GetOffset() int32 {
func (m *ListIrreparableSegmentsRequest) GetLastSeenSegmentPath() []byte {
if m != nil {
return m.Offset
return m.LastSeenSegmentPath
}
return 0
return nil
}
type IrreparableSegment struct {
@ -1514,112 +1514,113 @@ func init() {
func init() { proto.RegisterFile("inspector.proto", fileDescriptor_a07d9034b2dd9d26) }
var fileDescriptor_a07d9034b2dd9d26 = []byte{
// 1672 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0x39, 0x73, 0x1b, 0x47,
0x16, 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 0xfc, 0x19, 0x00, 0x00, 0xff, 0xff, 0xcf, 0xfc, 0x21, 0xfe, 0x01, 0x13,
0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.

View File

@ -59,7 +59,7 @@ service HealthInspector {
// ListSegments
message ListIrreparableSegmentsRequest {
int32 limit = 1;
int32 offset = 2;
bytes last_seen_segment_path = 2;
}
message IrreparableSegment {

View File

@ -15,7 +15,6 @@ import (
// Otherwise in most cases DialNode should be used for communicating with nodes since it is secure.
func DialAddressInsecure(ctx context.Context, address string, opts ...grpc.DialOption) (conn *grpc.ClientConn, err error) {
defer mon.Task()(&ctx)(&err)
options := append([]grpc.DialOption{
grpc.WithInsecure(),
grpc.WithBlock(),

View File

@ -772,8 +772,8 @@
},
{
"id": 2,
"name": "offset",
"type": "int32"
"name": "last_seen_segment_path",
"type": "bytes"
}
]
},

View File

@ -65,6 +65,7 @@ read one (
read limitoffset (
select irreparabledb
where irreparabledb.segmentpath > ?
orderby asc irreparabledb.segmentpath
)

View File

@ -6248,14 +6248,15 @@ func (obj *postgresImpl) Get_Irreparabledb_By_Segmentpath(ctx context.Context,
}
func (obj *postgresImpl) Limited_Irreparabledb_OrderBy_Asc_Segmentpath(ctx context.Context,
func (obj *postgresImpl) Limited_Irreparabledb_By_Segmentpath_Greater_OrderBy_Asc_Segmentpath(ctx context.Context,
irreparabledb_segmentpath_greater Irreparabledb_Segmentpath_Field,
limit int, offset int64) (
rows []*Irreparabledb, err error) {
var __embed_stmt = __sqlbundle_Literal("SELECT irreparabledbs.segmentpath, irreparabledbs.segmentdetail, irreparabledbs.pieces_lost_count, irreparabledbs.seg_damaged_unix_sec, irreparabledbs.repair_attempt_count FROM irreparabledbs ORDER BY irreparabledbs.segmentpath LIMIT ? OFFSET ?")
var __embed_stmt = __sqlbundle_Literal("SELECT irreparabledbs.segmentpath, irreparabledbs.segmentdetail, irreparabledbs.pieces_lost_count, irreparabledbs.seg_damaged_unix_sec, irreparabledbs.repair_attempt_count FROM irreparabledbs WHERE irreparabledbs.segmentpath > ? ORDER BY irreparabledbs.segmentpath LIMIT ? OFFSET ?")
var __values []interface{}
__values = append(__values)
__values = append(__values, irreparabledb_segmentpath_greater.value())
__values = append(__values, limit, offset)
@ -7716,7 +7717,7 @@ func (obj *postgresImpl) Limited_BucketMetainfo_By_ProjectId_And_Name_Greater_Or
limit int, offset int64) (
rows []*BucketMetainfo, err error) {
var __embed_stmt = __sqlbundle_Literal("SELECT bucket_metainfos.id, bucket_metainfos.project_id, bucket_metainfos.name, bucket_metainfos.path_cipher, bucket_metainfos.created_at, bucket_metainfos.default_segment_size, bucket_metainfos.default_encryption_cipher_suite, bucket_metainfos.default_encryption_block_size, bucket_metainfos.default_redundancy_algorithm, bucket_metainfos.default_redundancy_share_size, bucket_metainfos.default_redundancy_required_shares, bucket_metainfos.default_redundancy_repair_shares, bucket_metainfos.default_redundancy_optimal_shares, bucket_metainfos.default_redundancy_total_shares FROM bucket_metainfos WHERE bucket_metainfos.project_id = ? AND bucket_metainfos.name > ? ORDER BY bucket_metainfos.name LIMIT ? OFFSET ?")
var __embed_stmt = __sqlbundle_Literal("SELECT bucket_metainfos.id, bucket_metainfos.project_id, bucket_metainfos.name, bucket_metainfos.partner_id, bucket_metainfos.path_cipher, bucket_metainfos.created_at, bucket_metainfos.default_segment_size, bucket_metainfos.default_encryption_cipher_suite, bucket_metainfos.default_encryption_block_size, bucket_metainfos.default_redundancy_algorithm, bucket_metainfos.default_redundancy_share_size, bucket_metainfos.default_redundancy_required_shares, bucket_metainfos.default_redundancy_repair_shares, bucket_metainfos.default_redundancy_optimal_shares, bucket_metainfos.default_redundancy_total_shares FROM bucket_metainfos WHERE bucket_metainfos.project_id = ? AND bucket_metainfos.name > ? ORDER BY bucket_metainfos.name LIMIT ? OFFSET ?")
var __values []interface{}
__values = append(__values, bucket_metainfo_project_id.value(), bucket_metainfo_name_greater.value())
@ -7734,7 +7735,7 @@ func (obj *postgresImpl) Limited_BucketMetainfo_By_ProjectId_And_Name_Greater_Or
for __rows.Next() {
bucket_metainfo := &BucketMetainfo{}
err = __rows.Scan(&bucket_metainfo.Id, &bucket_metainfo.ProjectId, &bucket_metainfo.Name, &bucket_metainfo.PathCipher, &bucket_metainfo.CreatedAt, &bucket_metainfo.DefaultSegmentSize, &bucket_metainfo.DefaultEncryptionCipherSuite, &bucket_metainfo.DefaultEncryptionBlockSize, &bucket_metainfo.DefaultRedundancyAlgorithm, &bucket_metainfo.DefaultRedundancyShareSize, &bucket_metainfo.DefaultRedundancyRequiredShares, &bucket_metainfo.DefaultRedundancyRepairShares, &bucket_metainfo.DefaultRedundancyOptimalShares, &bucket_metainfo.DefaultRedundancyTotalShares)
err = __rows.Scan(&bucket_metainfo.Id, &bucket_metainfo.ProjectId, &bucket_metainfo.Name, &bucket_metainfo.PartnerId, &bucket_metainfo.PathCipher, &bucket_metainfo.CreatedAt, &bucket_metainfo.DefaultSegmentSize, &bucket_metainfo.DefaultEncryptionCipherSuite, &bucket_metainfo.DefaultEncryptionBlockSize, &bucket_metainfo.DefaultRedundancyAlgorithm, &bucket_metainfo.DefaultRedundancyShareSize, &bucket_metainfo.DefaultRedundancyRequiredShares, &bucket_metainfo.DefaultRedundancyRepairShares, &bucket_metainfo.DefaultRedundancyOptimalShares, &bucket_metainfo.DefaultRedundancyTotalShares)
if err != nil {
return nil, obj.makeErr(err)
}
@ -9988,14 +9989,15 @@ func (obj *sqlite3Impl) Get_Irreparabledb_By_Segmentpath(ctx context.Context,
}
func (obj *sqlite3Impl) Limited_Irreparabledb_OrderBy_Asc_Segmentpath(ctx context.Context,
func (obj *sqlite3Impl) Limited_Irreparabledb_By_Segmentpath_Greater_OrderBy_Asc_Segmentpath(ctx context.Context,
irreparabledb_segmentpath_greater Irreparabledb_Segmentpath_Field,
limit int, offset int64) (
rows []*Irreparabledb, err error) {
var __embed_stmt = __sqlbundle_Literal("SELECT irreparabledbs.segmentpath, irreparabledbs.segmentdetail, irreparabledbs.pieces_lost_count, irreparabledbs.seg_damaged_unix_sec, irreparabledbs.repair_attempt_count FROM irreparabledbs ORDER BY irreparabledbs.segmentpath LIMIT ? OFFSET ?")
var __embed_stmt = __sqlbundle_Literal("SELECT irreparabledbs.segmentpath, irreparabledbs.segmentdetail, irreparabledbs.pieces_lost_count, irreparabledbs.seg_damaged_unix_sec, irreparabledbs.repair_attempt_count FROM irreparabledbs WHERE irreparabledbs.segmentpath > ? ORDER BY irreparabledbs.segmentpath LIMIT ? OFFSET ?")
var __values []interface{}
__values = append(__values)
__values = append(__values, irreparabledb_segmentpath_greater.value())
__values = append(__values, limit, offset)
@ -11456,7 +11458,7 @@ func (obj *sqlite3Impl) Limited_BucketMetainfo_By_ProjectId_And_Name_Greater_Ord
limit int, offset int64) (
rows []*BucketMetainfo, err error) {
var __embed_stmt = __sqlbundle_Literal("SELECT bucket_metainfos.id, bucket_metainfos.project_id, bucket_metainfos.name, bucket_metainfos.path_cipher, bucket_metainfos.created_at, bucket_metainfos.default_segment_size, bucket_metainfos.default_encryption_cipher_suite, bucket_metainfos.default_encryption_block_size, bucket_metainfos.default_redundancy_algorithm, bucket_metainfos.default_redundancy_share_size, bucket_metainfos.default_redundancy_required_shares, bucket_metainfos.default_redundancy_repair_shares, bucket_metainfos.default_redundancy_optimal_shares, bucket_metainfos.default_redundancy_total_shares FROM bucket_metainfos WHERE bucket_metainfos.project_id = ? AND bucket_metainfos.name > ? ORDER BY bucket_metainfos.name LIMIT ? OFFSET ?")
var __embed_stmt = __sqlbundle_Literal("SELECT bucket_metainfos.id, bucket_metainfos.project_id, bucket_metainfos.name, bucket_metainfos.partner_id, bucket_metainfos.path_cipher, bucket_metainfos.created_at, bucket_metainfos.default_segment_size, bucket_metainfos.default_encryption_cipher_suite, bucket_metainfos.default_encryption_block_size, bucket_metainfos.default_redundancy_algorithm, bucket_metainfos.default_redundancy_share_size, bucket_metainfos.default_redundancy_required_shares, bucket_metainfos.default_redundancy_repair_shares, bucket_metainfos.default_redundancy_optimal_shares, bucket_metainfos.default_redundancy_total_shares FROM bucket_metainfos WHERE bucket_metainfos.project_id = ? AND bucket_metainfos.name > ? ORDER BY bucket_metainfos.name LIMIT ? OFFSET ?")
var __values []interface{}
__values = append(__values, bucket_metainfo_project_id.value(), bucket_metainfo_name_greater.value())
@ -11474,7 +11476,7 @@ func (obj *sqlite3Impl) Limited_BucketMetainfo_By_ProjectId_And_Name_Greater_Ord
for __rows.Next() {
bucket_metainfo := &BucketMetainfo{}
err = __rows.Scan(&bucket_metainfo.Id, &bucket_metainfo.ProjectId, &bucket_metainfo.Name, &bucket_metainfo.PathCipher, &bucket_metainfo.CreatedAt, &bucket_metainfo.DefaultSegmentSize, &bucket_metainfo.DefaultEncryptionCipherSuite, &bucket_metainfo.DefaultEncryptionBlockSize, &bucket_metainfo.DefaultRedundancyAlgorithm, &bucket_metainfo.DefaultRedundancyShareSize, &bucket_metainfo.DefaultRedundancyRequiredShares, &bucket_metainfo.DefaultRedundancyRepairShares, &bucket_metainfo.DefaultRedundancyOptimalShares, &bucket_metainfo.DefaultRedundancyTotalShares)
err = __rows.Scan(&bucket_metainfo.Id, &bucket_metainfo.ProjectId, &bucket_metainfo.Name, &bucket_metainfo.PartnerId, &bucket_metainfo.PathCipher, &bucket_metainfo.CreatedAt, &bucket_metainfo.DefaultSegmentSize, &bucket_metainfo.DefaultEncryptionCipherSuite, &bucket_metainfo.DefaultEncryptionBlockSize, &bucket_metainfo.DefaultRedundancyAlgorithm, &bucket_metainfo.DefaultRedundancyShareSize, &bucket_metainfo.DefaultRedundancyRequiredShares, &bucket_metainfo.DefaultRedundancyRepairShares, &bucket_metainfo.DefaultRedundancyOptimalShares, &bucket_metainfo.DefaultRedundancyTotalShares)
if err != nil {
return nil, obj.makeErr(err)
}
@ -14492,14 +14494,15 @@ func (rx *Rx) Limited_BucketUsage_By_BucketId_And_RollupEndTime_Greater_And_Roll
return tx.Limited_BucketUsage_By_BucketId_And_RollupEndTime_Greater_And_RollupEndTime_LessOrEqual_OrderBy_Desc_RollupEndTime(ctx, bucket_usage_bucket_id, bucket_usage_rollup_end_time_greater, bucket_usage_rollup_end_time_less_or_equal, limit, offset)
}
func (rx *Rx) Limited_Irreparabledb_OrderBy_Asc_Segmentpath(ctx context.Context,
func (rx *Rx) Limited_Irreparabledb_By_Segmentpath_Greater_OrderBy_Asc_Segmentpath(ctx context.Context,
irreparabledb_segmentpath_greater Irreparabledb_Segmentpath_Field,
limit int, offset int64) (
rows []*Irreparabledb, err error) {
var tx *Tx
if tx, err = rx.getTx(ctx); err != nil {
return
}
return tx.Limited_Irreparabledb_OrderBy_Asc_Segmentpath(ctx, limit, offset)
return tx.Limited_Irreparabledb_By_Segmentpath_Greater_OrderBy_Asc_Segmentpath(ctx, irreparabledb_segmentpath_greater, limit, offset)
}
func (rx *Rx) Limited_Node_By_Id_GreaterOrEqual_OrderBy_Asc_Id(ctx context.Context,
@ -15155,7 +15158,8 @@ type Methods interface {
limit int, offset int64) (
rows []*BucketUsage, err error)
Limited_Irreparabledb_OrderBy_Asc_Segmentpath(ctx context.Context,
Limited_Irreparabledb_By_Segmentpath_Greater_OrderBy_Asc_Segmentpath(ctx context.Context,
irreparabledb_segmentpath_greater Irreparabledb_Segmentpath_Field,
limit int, offset int64) (
rows []*Irreparabledb, err error)

View File

@ -87,10 +87,17 @@ func (db *irreparableDB) Get(ctx context.Context, segmentPath []byte) (resp *pb.
}, nil
}
// Getlimited number of irreparable segments by offset
func (db *irreparableDB) GetLimited(ctx context.Context, limit int, offset int64) (resp []*pb.IrreparableSegment, err error) {
// GetLimited returns a list of irreparable segment info starting after the last segment info we retrieved
func (db *irreparableDB) GetLimited(ctx context.Context, limit int, lastSeenSegmentPath []byte) (resp []*pb.IrreparableSegment, err error) {
defer mon.Task()(&ctx)(&err)
rows, err := db.db.Limited_Irreparabledb_OrderBy_Asc_Segmentpath(ctx, limit, offset)
// the offset is hardcoded to 0 since we are using the lastSeenSegmentPath to
// indicate the item we last listed instead. In a perfect world this db query would
// not take an offset as an argument, but currently dbx only supports `limitoffset`
const offset = 0
rows, err := db.db.Limited_Irreparabledb_By_Segmentpath_Greater_OrderBy_Asc_Segmentpath(ctx,
dbx.Irreparabledb_Segmentpath(lastSeenSegmentPath),
limit, offset,
)
if err != nil {
return nil, err
}

View File

@ -741,11 +741,11 @@ func (m *lockedIrreparable) Get(ctx context.Context, segmentPath []byte) (*pb.Ir
return m.db.Get(ctx, segmentPath)
}
// GetLimited number of segments from offset
func (m *lockedIrreparable) GetLimited(ctx context.Context, limit int, offset int64) ([]*pb.IrreparableSegment, error) {
// GetLimited returns a list of irreparable segment info starting after the last segment info we retrieved
func (m *lockedIrreparable) GetLimited(ctx context.Context, limit int, lastSeenSegmentPath []byte) ([]*pb.IrreparableSegment, error) {
m.Lock()
defer m.Unlock()
return m.db.GetLimited(ctx, limit, offset)
return m.db.GetLimited(ctx, limit, lastSeenSegmentPath)
}
// IncrementRepairAttempts increments the repair attempts.