Skip to content

Commit 4766421

Browse files
committed
add review comments
1 parent 2a36b57 commit 4766421

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

storage/operation/badgerimpl/reader.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ func (b dbReader) Get(key []byte) ([]byte, io.Closer, error) {
5353
// - have a prefix equal to startPrefix OR
5454
// - have a prefix equal to the endPrefix OR
5555
// - have a prefix that is lexicographically between startPrefix and endPrefix
56+
//
57+
// no errors are expected during normal operation
5658
func (b dbReader) NewIter(startPrefix, endPrefix []byte, ops storage.IteratorOption) (storage.Iterator, error) {
5759
return newBadgerIterator(b.db, startPrefix, endPrefix, ops), nil
5860
}

storage/operation/badgerimpl/writer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ type ReaderBatchWriter struct {
2020
var _ storage.ReaderBatchWriter = (*ReaderBatchWriter)(nil)
2121

2222
// GlobalReader returns a database-backed reader which reads the latest committed global database state ("read-committed isolation").
23-
// This reader will not read writes written to ReaderBatchWriter.Writer until the write batch is committed.
23+
// This reader will not read un-committed writes written to ReaderBatchWriter.Writer until the write batch is committed.
2424
// This reader may observe different values for the same key on subsequent reads.
2525
func (b *ReaderBatchWriter) GlobalReader() storage.Reader {
2626
return b.globalReader

0 commit comments

Comments
 (0)