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 commitBNP_v2.7.8-test176fca2138
) closes https://github.com/influxdata/influxdb/issues/25153 (cherry picked from commit031f394d2c
) closes https://github.com/influxdata/influxdb/issues/25154
parent
e9e0f744fa
commit
8e0d754c1e
|
@ -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