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

Local Storage Range Allow 0:0 #6116

Merged
merged 2 commits into from
Jun 19, 2023
Merged

Conversation

Isan-Rivkin
Copy link
Contributor

Linked Issue

Fixes #6115

@Isan-Rivkin Isan-Rivkin self-assigned this Jun 18, 2023
@Isan-Rivkin Isan-Rivkin added the include-changelog PR description should be included in next release changelog label Jun 18, 2023
@Isan-Rivkin Isan-Rivkin requested review from nopcoder and guy-har June 18, 2023 15:10
@guy-har guy-har requested a review from N-o-Z June 18, 2023 15:20
@@ -325,7 +325,7 @@ func (l *Adapter) Exists(_ context.Context, obj block.ObjectPointer) (bool, erro
}

func (l *Adapter) GetRange(_ context.Context, obj block.ObjectPointer, start int64, end int64) (io.ReadCloser, error) {
if start < 0 || end <= 0 {
if start < 0 || end < 0 {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if start < 0 || end < 0 {
if start < 0 || end < start {

Copy link
Member

Choose a reason for hiding this comment

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

Consider this change

Copy link
Contributor Author

Choose a reason for hiding this comment

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

like +1

Copy link
Member

@N-o-Z N-o-Z left a comment

Choose a reason for hiding this comment

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

Change suggestion

@@ -325,7 +325,7 @@ func (l *Adapter) Exists(_ context.Context, obj block.ObjectPointer) (bool, erro
}

func (l *Adapter) GetRange(_ context.Context, obj block.ObjectPointer, start int64, end int64) (io.ReadCloser, error) {
if start < 0 || end <= 0 {
if start < 0 || end < 0 {
Copy link
Member

Choose a reason for hiding this comment

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

Consider this change

Co-authored-by: N-o-Z <ozery.nir@gmail.com>
@Isan-Rivkin Isan-Rivkin requested a review from N-o-Z June 18, 2023 15:46
Copy link
Member

@N-o-Z N-o-Z left a comment

Choose a reason for hiding this comment

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

Thanks !

@Isan-Rivkin Isan-Rivkin merged commit 722c2f2 into master Jun 19, 2023
@Isan-Rivkin Isan-Rivkin deleted the bug/http-range-local-storage-get-obj branch June 19, 2023 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
include-changelog PR description should be included in next release changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: local storage - adapter errors in GetRange() when index range is [0:0]
3 participants