client-go icon indicating copy to clipboard operation
client-go copied to clipboard

Support context in Iterator.Next() operation

Open Xuanwo opened this issue 4 years ago • 1 comments

Next() should accept ctx context.Context() as arguement for request cancelling.

These features used to be like following in v1:

it, err := tx.Iter(context.TODO(), key.Key(keyPrefix), nil)
it.Next(context.TODO())

func (s *TiKVSnapshot) IterReverse(ctx context.Context, k key.Key) (kv.Iterator, error) {
        return nil, ErrNotImplemented
}

Xuanwo avatar Jun 29 '21 09:06 Xuanwo

Good point. I'll look into what we need to do to fix it later.

disksing avatar Jun 29 '21 11:06 disksing

I don't need this feature anymore, and there is no support from the community. Let's close.

Xuanwo avatar Sep 15 '22 13:09 Xuanwo