Closed v0y4g3r closed 1 week ago
This bug may relate to the different behavior between readers.
In the outer, the reader may be polled until it yields a None
But in the inner RowGroupLastRowReader, it only yields a batch when reaches a new time series. So the last time the reader is polled it will update the cache with an empty yield_batches
.
https://github.com/GreptimeTeam/greptimedb/blob/0b0ed03ee63c7e5baaeda8b5cc93f22cbdc86124/src/mito2/src/read/last_row.rs#L190
We can quick fix this by check the length of RowGroupLastRowReader::yielded_batches
, because we always expect that one row group should at least contain a batch. If yielded_batches is empty, then this poll must be an invalid poll and we should not cache the result.
What type of bug is this?
Incorrect result
What subsystems are affected?
Standalone mode, Storage Engine
Minimal reproduce step
ADMIN flush_table('cpu')
This step is expected to get 4000 rows of results in that the data set has 4000 time series in total.
What did you expect to see?
The query above should always give a result of 4000 rows.
What did you see instead?
An empty set.
What operating system did you use?
NA
What version of GreptimeDB did you use?
0.9.2
Relevant log output and stack trace
No response