Skip to content

Commit

Permalink
rename context err counter
Browse files Browse the repository at this point in the history
  • Loading branch information
akansha1812 committed Nov 14, 2024
1 parent 71d12c0 commit 8a9e007
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions storage/dataflux/fast_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ type Lister struct {
// worksteal listing is expected to be faster.
func (c *Lister) NextBatch(ctx context.Context) ([]*storage.ObjectAttrs, error) {
// countError tracks the number of failed listing methods.
cc := &contextErr{counter: 0}
cc := &countErr{counter: 0}

var results []*storage.ObjectAttrs
ctx, cancel := context.WithCancel(ctx)
Expand Down Expand Up @@ -225,12 +225,12 @@ func (c *Lister) Close() {
}
}

type contextErr struct {
type countErr struct {
mu sync.Mutex
counter int
}

func (cc *contextErr) increment() {
func (cc *countErr) increment() {
cc.mu.Lock()
defer cc.mu.Unlock()
cc.counter++
Expand Down

0 comments on commit 8a9e007

Please sign in to comment.