Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Httpclient] fix pointer position of mmap object in the case of failure #118

Merged
merged 7 commits into from
Mar 31, 2024

Conversation

tomerm-iguazio
Copy link
Contributor

@tomerm-iguazio tomerm-iguazio commented Mar 27, 2024

ML-5926

When using an mmap object, this bug might occur:

If the first connection fails, the pointer still moves at the first attempt by the first connection's block size. After it fails, we try to create another connection and send data, but not from the beginning of the file.

This is why we might miss some bytes at the beginning of the file.

This PR solves the issue and explains it with comments.

Copy link
Member

@gtopper gtopper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Let's add a test.

Copy link

@liranbg liranbg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏🏼

@assaf758 assaf758 requested a review from alxtkr77 March 27, 2024 12:22
Copy link
Contributor

@alxtkr77 alxtkr77 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.

Copy link
Member

@gtopper gtopper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Only have a few minor comments for consideration.

tests/test_client_errors.py Outdated Show resolved Hide resolved
tests/test_client_errors.py Outdated Show resolved Hide resolved
v3io/dataplane/transport/httpclient.py Outdated Show resolved Hide resolved
@assaf758 assaf758 merged commit 883d72c into v3io:development Mar 31, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants