The measurementFieldSetChangeMgr has a possibly infinite loop
if the writeRequests channel is closed while in the inner
loop to consolidate write requests. We need to check for ok
on channel receive and exit the loop when ok is false.
closes https://github.com/influxdata/influxdb/issues/25151
(cherry picked from commit 176fca2138
)
closes https://github.com/influxdata/influxdb/issues/25153
pull/25198/head
parent
c2b3e38a38
commit
031f394d2c
|
@ -2276,10 +2276,12 @@ func (fscm *measurementFieldSetChangeMgr) appendToChangesFile(first writeRequest
|
|||
// requests
|
||||
for {
|
||||
select {
|
||||
case wr := <-fscm.writeRequests:
|
||||
changes = append(changes, wr.changes)
|
||||
errorChannels = append(errorChannels, wr.errorReturn)
|
||||
continue
|
||||
case wr, ok := <-fscm.writeRequests:
|
||||
if ok {
|
||||
changes = append(changes, wr.changes)
|
||||
errorChannels = append(errorChannels, wr.errorReturn)
|
||||
continue
|
||||
}
|
||||
default:
|
||||
}
|
||||
break
|
||||
|
|
Loading…
Reference in New Issue