influxdata / influxdata/influxdb

[2.x] Error on quering data after inserting point with empty string field

Open
#26,916 5 comments 0 reactions 1 assignee Claimed by @devanbenz View on GitHub
area/2.x area/flux
Dominant language
Rust
Stars
31.7k
Forks
3.7k
Avg merge
13h 37m
Merged PRs (30d)
8

Description

__Steps to reproduce:__

1. Create bucket
`influx bucket create --name bucket1 --retention 3h`
2. Insert point with non-empty string field
`influx write -b bucket1 -p s 'myMeasurement,host=myHost testField="testData",testField2="data2" 1760888710'`
3. Make sure that data is returned using this query to get the latest point:
`influx query 'from(bucket: "bucket1")|> range(start: 0, stop: 1960524948)|> filter(fn: (r) => r._measurement == "myMeasurement")|> max(column: "_time")'`
4. Insert point with empty string field
`influx write -b bucket1 -p s 'myMeasurement,host=myHost testField="testData",testField2="" 1760888711'`
5. Repeat step 3 (query the data)

__Expected behaviour:__
Last point with TS 1760888711 and empty testField2 is returned

__Actual behaviour:__
`Error: failed to execute query: 500 Internal Server Error: panic: arrow/array: index out of range`.

No error if `|> max(column: "_time")'` is removed from the query.

Syslog contains a more extended error:
`Oct 19 16:06:01 oxkpjnrria influxd-systemd-start.sh[700757]: ts=2025-10-19T16:06:01.300509Z lvl=info msg="Invalid column reader received from predecessor" log_id=0zax1Vyl000 service=storage-reads source="@1:118-1:138: max" error="mismatched column lengths: map[_field:string:2 _measurement:string:2 _start:time:2 _stop:time:2 _time:time:2 _value:string:1 host:string:2]"
Oct 19 16:06:01 oxkpjnrria influxd-systemd-start.sh[700757]: ts=2025-10-19T16:06:01.311070Z lvl=info msg="Dispatcher panic" log_id=0zax1Vyl000 service=storage-reads component=dispatcher error="panic: arrow/array: index out of range" stacktrace="goroutine 5375900 [running]:\nruntime/debug.Stack()\n\t/go/src/runtime/debug/stack.go:24 +0x5e\ngithub.com/influxdata/flux/execute.(*poolDispatcher).recover(0xc007741490)\n\t/go/pkg/mod/github.com/influxdata/flux@v0.195.2/execute/recover.go:53 +0x1fb\npanic({0x781c067e0b40?, 0x781c06dbde40?})\n\t/go/src/runtime/panic.go:770 +0x132\ngithub.com/apache/arrow/go/v7/arrow/array.(*Binary).Value(...)\n\t/go/pkg/mod/github.com/apache/arrow/go/v7@v7.0.1/arrow/array/binary.go:47\ngithub.com/apache/arrow/go/v7/arrow/array.(*Binary).ValueString(0x186feef3fc268600?, 0x0?)\n\t/go/pkg/mod/github.com/apache/arrow/go/v7@v7.0.1/arrow/array/binary.go:56 +0xb8\ngithub.com/influxdata/flux/array.(*String).Value(...)\n\t/go/pkg/mod/github.com/influxdata/flux@v0.195.2/array/array.go:157\ngithub.com/influxdata/flux/execute.ReadRow(0x1, {0x781c06e18230, 0xc007526780})\n\t/go/pkg/mod/github.com/influxdata/flux@v0.195.2/execute/selector.go:346 +0x362\ngithub.com/influxdata/flux/stdlib/universe.(*MaxSelector).selectRow(...)\n\t/go/pkg/mod/github.com/influxdata/flux@v0.195.2/stdlib/universe/max.go:136\ngithub.com/influxdata/flux/stdlib/universe.(*MaxIntSelector).DoInt(0xc00678f530, 0x0?, {0x781c06e18230?, 0xc007526780?})\n\t/go/pkg/mod/github.com/influxdata/flux@v0.195.2/stdlib/universe/max.go:154 +0xe6\ngithub.com/influxdata/flux/stdlib/universe.(*MaxTimeSelector).DoTime(0x0?, 0x0?, {0x781c06e18230?, 0xc007526780?})\n\t/go/pkg/mod/github.com/influxdata/flux@v0.195.2/stdlib/universe/max.go:141 +0x1f\ngithub.com/influxdata/flux/execute.(*rowSelectorTransformation).Process.func1({0x781c06e18230, 0xc007526780})\n\t/go/pkg/mod/github.com/influxdata/flux@v0.195.2/execute/selector.go:213 +0x392\ngithub.com/influxdata/flux/execute.(*consecutiveTransportTable).Do.func1({0x781c06e18230, 0xc007526780})\n\t/go/pkg/mod/github.com/influxdata/flux@v0.195.2/execute/transport.go:572 +0x479\ngithub.com/influxdata/influxdb/v2/storage/flux.(*table).do(0xc001be49f8?, 0xc00316a9a8, 0xc0071c59e8)\n\t/root/project/storage/flux/table.go:92 +0xb1\ngithub.com/influxdata/influxdb/v2/storage/flux.(*stringTable).Do(0x781c06b4fa80?, 0x781c03219d01?)\n\t/root/project/storage/flux/table.gen.go:3030 +0x31\ngithub.com/influxdata/flux/execute.(*consecutiveTransportTable).Do(0xc00316a978, 0xc00638c200)\n\t/go/pkg/mod/github.com/influxdata/flux@v0.195.2/execute/transport.go:554 +0x76\ngithub.com/influxdata/flux/execute.(*rowSelectorTransformation).Process(0xc004c9c460, {0x40, 0x1, 0x85, 0x4, 0x85, 0x28, 0x5b, 0x36, 0xb6, ...}, ...)\n\t/go/pkg/mod/github.com/influxdata/flux@v0.195.2/execute/selector.go:210 +0x45d\ngithub.com/influxdata/flux/execute.(*transformationTransportAdapter).ProcessMessage(0xc0049bfc20, {0x781c06df3bb8, 0xc0010024c0})\n\t/go/pkg/mod/github.com/influxdata/flux@v0.195.2/execute/transport.go:652 +0xa9d\ngithub.com/influxdata/flux/execute.(*consecutiveTransport).processMessage(0xc005114780, {0x781c06df3bb8, 0xc0010024c0})\n\t/go/pkg/mod/github.com/influxdata/flux@v0.195.2/execute/transport.go:297 +0xbb\ngithub.com/influxdata/flux/execute.(*consecutiveTransport).processMessages(0xc005114780, {0x781c06df1250?, 0xc004c9c410?}, 0xa)\n\t/go/pkg/mod/github.com/influxdata/flux@v0.195.2/execute/transport.go:251 +0xe5\ngithub.com/influxdata/flux/execute.(*poolDispatcher).doWork(0xc007741490, {0x781c06df1250, 0xc004c9c410})\n\t/go/pkg/mod/github.com/influxdata/flux@v0.195.2/execute/dispatcher.go:157 +0x18c\ngithub.com/influxdata/flux/execute.(*poolDispatcher).run(0xc007741490, {0x781c06df1250, 0xc004c9c410})\n\t/go/pkg/mod/github.com/influxdata/flux@v0.195.2/execute/dispatcher.go:135 +0x49\ngithub.com/influxdata/flux/execute.(*poolDispatcher).Start.func1()\n\t/go/pkg/mod/github.com/influxdata/flux@v0.195.2/execute/dispatcher.go:75 +0x85\ncreated by github.com/influxdata/flux/execute.(*poolDispatcher).Start in goroutine 1930\n\t/go/pkg/mod/github.com/influxdata/flux@v0.195.2/execute/dispatcher.go:71 +0x51\n"
`
__Environment info:__
Linux 6.8.0-52-generic x86_64
Ubuntu 22.04.5 LTS
influxdb2/unknown,now 2.7.12-1 amd64

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.