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

Fetch: ensure consistency between response, done-chan, and cache state. #24401

Merged

Conversation

@gterzian
Copy link
Member

gterzian commented Oct 9, 2019

This ensures that when a cached response is not used because it requires revalidation, the done chan is set back to None(since the cache might have set it to Some when constructing the response requiring revalidation).


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix #24399 (GitHub issue number if applicable)
  • There are tests for these changes OR
  • These changes do not require tests because ___

This change is Reviewable

@gterzian gterzian requested a review from jdm Oct 9, 2019
@gterzian gterzian force-pushed the gterzian:ensure_done_chan_is_none_when_revalidating branch from 81d31f0 to 830410f Oct 9, 2019
@gterzian gterzian changed the title fetch: ensure done_chan is not set, when the cached response is not u… Fetch: ensure done_chan is None, when cached response is not used. Oct 9, 2019
@gterzian gterzian force-pushed the gterzian:ensure_done_chan_is_none_when_revalidating branch from 830410f to be42a62 Oct 9, 2019
@gterzian gterzian changed the title Fetch: ensure done_chan is None, when cached response is not used. Fetch: ensure consistency between response, done-chan, and cache state. Oct 9, 2019
@gterzian
Copy link
Member Author

gterzian commented Oct 9, 2019

The issue also affected the cache state, since concurrent fetches should also wait for a pending revalidation.

@gterzian gterzian force-pushed the gterzian:ensure_done_chan_is_none_when_revalidating branch from be42a62 to bb1fa88 Oct 9, 2019
@jdm
Copy link
Member

jdm commented Oct 9, 2019

@bors-servo r+
Thanks!

@bors-servo
Copy link
Contributor

bors-servo commented Oct 9, 2019

📌 Commit bb1fa88 has been approved by jdm

@jdm
jdm approved these changes Oct 9, 2019
@bors-servo
Copy link
Contributor

bors-servo commented Oct 9, 2019

Testing commit bb1fa88 with merge b34fc13...

bors-servo added a commit that referenced this pull request Oct 9, 2019
…ating, r=jdm

Fetch: ensure consistency between response, done-chan, and cache state.

This ensures that when a cached response is not used because it requires revalidation, the done chan is set back to `None`(since the cache might have set it to `Some` when constructing the response requiring revalidation).

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #24399 (GitHub issue number if applicable)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because ___

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24401)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Oct 9, 2019

☀️ Test successful - linux-rel-css, linux-rel-wpt, status-taskcluster
Approved by: jdm
Pushing b34fc13 to master...

@bors-servo bors-servo merged commit bb1fa88 into servo:master Oct 9, 2019
2 of 3 checks passed
2 of 3 checks passed
continuous-integration/appveyor/pr AppVeyor build failed
Details
Taskcluster (pull_request) TaskGroup: success
Details
homu Test successful
Details
@gterzian gterzian deleted the gterzian:ensure_done_chan_is_none_when_revalidating branch Oct 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

4 participants
You can’t perform that action at this time.