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/25152
db-backport-25207
parent
679426b9a5
commit
01a35eb79a
|
@ -2020,10 +2020,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