-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Labels
T:bugType Bug (Confirmed)Type Bug (Confirmed)
Description
tendermint/libs/db/remotedb/grpcdb/server.go
Lines 139 to 161 in e0f8936
| func (s *server) Iterator(query *protodb.Entity, dis protodb.DB_IteratorServer) error { | |
| it := s.db.Iterator(query.Start, query.End) | |
| return s.handleIterator(it, dis.Send) | |
| } | |
| func (s *server) handleIterator(it db.Iterator, sendFunc func(*protodb.Iterator) error) error { | |
| for it.Valid() { | |
| start, end := it.Domain() | |
| out := &protodb.Iterator{ | |
| Domain: &protodb.Domain{Start: start, End: end}, | |
| Valid: it.Valid(), | |
| Key: it.Key(), | |
| Value: it.Value(), | |
| } | |
| if err := sendFunc(out); err != nil { | |
| return err | |
| } | |
| // Finally move the iterator forward | |
| it.Next() | |
| } | |
| return nil | |
| } |
Though this part of codes does not seem to be used for now, but in case it's used in the future, do we need to close the Iterator in handleIterator?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
T:bugType Bug (Confirmed)Type Bug (Confirmed)