apache / apache/arrow-java

[Java] ArrowMessage failed to parse compressed grpc stream

Open
#391 2 comments 0 reactions 0 assignees View on GitHub
Type: bug
Dominant language
Java
Stars
94
Forks
152
Avg merge
3d 16h
Merged PRs (30d)
11

Description

InvalidProtocolBufferException will be thrown in ArrowMessage.frame if we use gzip compress in Grpc.

The reason is stream.available will still be 1 after we read compressed data. There should be another attempt read to change InflaterInputStream.reachEOF to be true, and make stream.available to be 0.

Thus we need check stream.available after read tag from stream.

**Reporter**: [Jackey Lee](https://issues.apache.org/jira/browse/ARROW-11177) / @jackylee-ch
#### PRs and other links:
- [GitHub Pull Request apache/arrow#9147](https://github.com/apache/arrow/pull/9147)

**Note**: *This issue was originally created as [ARROW-11177](https://issues.apache.org/jira/browse/ARROW-11177). Please see the [migration documentation](https://github.com/apache/arrow/issues/14542) for further details.*

Contributor guide

Open the contributing guide

Research direction

Start in ArrowMessage.frame and inspect the read-tag handling for compressed gRPC streams, with attention to stream.available and InvalidProtocolBufferException. Review the linked PR #9147 and verify that gzip-compressed input parses successfully without the stream being treated as prematurely available.

Written by the indexing model from the issue text.

Assessment

Tech stack
grpc, java
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.