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

Address review comments on resumption #153

Merged
merged 1 commit into from
Jul 13, 2021
Merged

Address review comments on resumption #153

merged 1 commit into from
Jul 13, 2021

Conversation

masih
Copy link
Member

@masih masih commented Jul 13, 2021

  • Use the file already open to get the stats for resumption purposes. On
    getting the stats, because the open flag contains os.O_CREATE check
    the size of the file as a way to determine wheter we should attempt
    resumption or not. In practice this is the same as the code that
    explicitly differentiates from non-existing files, since file existence
    doesn't matter here; the key thing is the file content. Plus this also
    avoids unnecessary errors where the files exists but is empty.

  • Add TODOs in places to consider enabling deduplication by default and
    optimise computational complexity of roots check. Note, explicitly
    enable deduplication by default in a separate PR so that the change is
    clearly communicated to dependant clients in case it causes any
    unintended side-effects.

  • Rename Equals to Matches to avoid confusion about what it does.

Relates to:

@masih masih requested a review from mvdan July 13, 2021 12:07
* Use the file already open to get the stats for resumption purposes. On
getting the stats, because the open flag contains `os.O_CREATE` check
the size of the file as a way to determine wheter we should attempt
resumption or not. In practice this is the same as the code that
explicitly differentiates from non-existing files, since file existence
doesn't matter here; the key thing is the file content. Plus this also
avoids unnecessary errors where the files exists but is empty.

* Add TODOs in places to consider enabling deduplication by default and
optimise computational complexity of roots check. Note, explicitly
enable deduplication by default in a separate PR so that the change is
clearly communicated to dependant clients in case it causes any
unintended side-effects.

* Rename `Equals` to `Matches` to avoid confusion about what it does.

Relates to:
- #147 (comment)
- #147 (comment)
- #147 (comment)
@masih masih added this to the CAR v2 milestone Jul 13, 2021
@masih masih merged commit 700ab32 into ipld:wip-v2 Jul 13, 2021
@masih masih deleted the feedback-resumption branch July 13, 2021 12:42
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.

2 participants