Skip to content

EOF not handled correctly in single byte read in cloud storage InputStream implementations #16062

@anoopj

Description

@anoopj

Apache Iceberg version

1.10.1 (latest release)

Query engine

None

Please describe the bug 🐞

Description

#16055 identified and fixed an EOF handling bug in GCSInputStream. But it looks like the same bug exists in all other cloud storage InputStream implementations.

Impact: The single-byte read() bug can cause an infinite loop for callers that reads until EOF. In practice, Iceberg typically reads files using range reads at known offsets rather than sequential reads to EOF, so this is unlikely to be hit in the hot path.

There is also a metric bug in the buffered read called out in the PR.

Affected implementations:

GCS fix from @vladislav-sidorovich : #16055

Willingness to contribute

  • I can contribute a fix for this bug independently
  • I would be willing to contribute a fix for this bug with guidance from the Iceberg community
  • I cannot contribute a fix for this bug at this time

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions