Skip to content

Commit e3f35e5

Browse files
committed
kvserver/rangefeed: rename overflow to overflowed
This commit renames overflow to overflowed in BufferedSender for clarity.
1 parent 81e65c9 commit e3f35e5

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

pkg/kv/kvserver/rangefeed/buffered_sender.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ type BufferedSender struct {
5757
// queueMu protects the buffer queue.
5858
queueMu struct {
5959
syncutil.Mutex
60-
stopped bool
61-
buffer *eventQueue
62-
capacity int64
63-
overflow bool
60+
stopped bool
61+
buffer *eventQueue
62+
capacity int64
63+
overflowed bool
6464
}
6565

6666
// notifyDataC is used to notify the BufferedSender.run goroutine that there
@@ -100,13 +100,13 @@ func (bs *BufferedSender) sendBuffered(
100100
if bs.queueMu.stopped {
101101
return errors.New("stream sender is stopped")
102102
}
103-
if bs.queueMu.overflow {
103+
if bs.queueMu.overflowed {
104104
// Is this too spammy
105105
log.Dev.Error(context.Background(), "buffer capacity exceeded")
106106
return newRetryErrBufferCapacityExceeded()
107107
}
108108
if bs.queueMu.buffer.len() >= bs.queueMu.capacity {
109-
bs.queueMu.overflow = true
109+
bs.queueMu.overflowed = true
110110
return newRetryErrBufferCapacityExceeded()
111111
}
112112
// TODO(wenyihu6): pass an actual context here
@@ -176,7 +176,7 @@ func (bs *BufferedSender) popFront() (
176176
bs.queueMu.Lock()
177177
defer bs.queueMu.Unlock()
178178
event, ok := bs.queueMu.buffer.popFront()
179-
return event, ok, bs.queueMu.overflow, bs.queueMu.buffer.len()
179+
return event, ok, bs.queueMu.overflowed, bs.queueMu.buffer.len()
180180
}
181181

182182
// cleanup is called when the sender is stopped. It is expected to free up

0 commit comments

Comments
 (0)