mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-22 06:22:38 +00:00
iceberg maintenance: read the returned row before treating EOF as empty
parquet-go can return a row alongside io.EOF; a one-row merged file then lost its first_row_id and the manifest list would allocate a fresh range. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
parent
2b05ff29e0
commit
d2ae804040
@@ -372,12 +372,13 @@ func mergedFileFirstRowID(data []byte) (*int64, error) {
|
||||
return nil, nil
|
||||
}
|
||||
rows := make([]parquet.Row, 1)
|
||||
if _, err := reader.ReadRows(rows); err != nil {
|
||||
if err == io.EOF {
|
||||
return nil, nil
|
||||
}
|
||||
n, err := reader.ReadRows(rows)
|
||||
if err != nil && err != io.EOF {
|
||||
return nil, err
|
||||
}
|
||||
if n == 0 {
|
||||
return nil, nil
|
||||
}
|
||||
for _, v := range rows[0] {
|
||||
if v.Column() != leaf.ColumnIndex {
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user