hazelcast / hazelcast/hazelcast-python-client

[TRACKING ISSUE] Check for the minimum size of the bytes read only once per frame

Open
#554 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
116
Forks
78
Avg merge
10d 22h
Merged PRs (30d)
1

Description

The tracking issue for the Java side PR.

See https://github.com/hazelcast/hazelcast/pull/21502 for details.

---

Before this fix, while reading a message frame, we were mistakenly
checking that the bytes we haven't read yet are less than 6 bytes
each time the `ClientMessageReader#readFrame` is called.

This is problematic for frames that are read in multiple calls,
as the size of the last piece of the frame we are reading might be
actually less than 6 bytes and that is definitely valid. However,
in that case, we were not able to read the remaining part and
continue.

This PR aims to fix this problem by having that check only at the
beginning for each frame, only once per frame. Once we read the frame
length and flags, we will be able to read any number of bytes no
matter how small it is.

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.