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

Http cache: wait on pending stores #24318

Merged
merged 1 commit into from Oct 8, 2019
Merged

Conversation

@gterzian
Copy link
Member

gterzian commented Sep 29, 2019

FIX #24166


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

This change is Reviewable

@highfive
Copy link

highfive commented Sep 29, 2019

Heads up! This PR modifies the following files:

  • @KiChjang: components/net/fetch/methods.rs, components/net/http_loader.rs, components/net/resource_thread.rs, components/net/http_cache.rs
@highfive
Copy link

highfive commented Sep 29, 2019

warning Warning warning

  • These commits modify net code, but no tests are modified. Please consider adding a test!
@gterzian gterzian changed the title Http cache condvar Http cache: wait on pending stores Sep 29, 2019
@gterzian
Copy link
Member Author

gterzian commented Sep 29, 2019

@bors-servo try=wpt

@bors-servo
Copy link
Contributor

bors-servo commented Sep 29, 2019

Trying commit 89fe0ba with merge cd5b3cc...

bors-servo added a commit that referenced this pull request Sep 29, 2019
Http cache: wait on pending stores

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

---
<!-- 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 #___ (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/24318)
<!-- Reviewable:end -->
@gterzian gterzian force-pushed the gterzian:http-cache-condvar branch 2 times, most recently from cbdc65d to 8cdd99a Sep 29, 2019
@gterzian
Copy link
Member Author

gterzian commented Sep 30, 2019

@bors-servo try=wpt

@bors-servo
Copy link
Contributor

bors-servo commented Sep 30, 2019

Trying commit 8cdd99a with merge 30e695f...

bors-servo added a commit that referenced this pull request Sep 30, 2019
Http cache: wait on pending stores

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

---
<!-- 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 #___ (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/24318)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Sep 30, 2019

☀️ Test successful - linux-rel-css, linux-rel-wpt, status-taskcluster
State: approved= try=True

@gterzian gterzian force-pushed the gterzian:http-cache-condvar branch from 8cdd99a to 9407aac Sep 30, 2019
@gterzian
Copy link
Member Author

gterzian commented Sep 30, 2019

@bors-servo try=wpt (split the state per cache key, so fetches don't wait on the condvar unless the pending store relates to their key)

@bors-servo
Copy link
Contributor

bors-servo commented Sep 30, 2019

Trying commit 9407aac with merge c1f701b...

bors-servo added a commit that referenced this pull request Sep 30, 2019
Http cache: wait on pending stores

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

---
<!-- 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 #___ (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/24318)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Sep 30, 2019

💔 Test failed - linux-rel-css

@gterzian
Copy link
Member Author

gterzian commented Sep 30, 2019

{
    "status": "CRASH", 
    "group": "default", 
    "message": null, 
    "stack": null, 
    "subtest": null, 
    "test": "/_webgl/conformance/ogles/GL/functions/functions_065_to_072.html", 
    "line": 228192, 
    "action": "test_result", 
    "expected": "OK"
}

I'm pretty certain this one is intermittent, filed #24320

@gterzian gterzian force-pushed the gterzian:http-cache-condvar branch from 9407aac to 1d374f3 Sep 30, 2019
@gterzian gterzian force-pushed the gterzian:http-cache-condvar branch 2 times, most recently from 5da34f6 to 551e7fb Sep 30, 2019
components/net/http_loader.rs Outdated Show resolved Hide resolved
@gterzian gterzian force-pushed the gterzian:http-cache-condvar branch 3 times, most recently from 56de49d to 08b3243 Oct 2, 2019
@jdm
Copy link
Member

jdm commented Oct 4, 2019

Test written in #24370. Want to review it and see what happens with your changes?

@bors-servo
Copy link
Contributor

bors-servo commented Oct 5, 2019

The latest upstream changes (presumably #24374) made this pull request unmergeable. Please resolve the merge conflicts.

@gterzian gterzian force-pushed the gterzian:http-cache-condvar branch from b08f2f0 to ba7a157 Oct 6, 2019
@gterzian gterzian removed the S-needs-rebase label Oct 6, 2019
@gterzian gterzian force-pushed the gterzian:http-cache-condvar branch from ba7a157 to 3486c1e Oct 6, 2019
if new == 0 {
*state = HttpCacheEntryState::ReadyToConstruct;
// Notify the next thread waiting in line, if there is any.
cvar.notify_one();

This comment has been minimized.

@gterzian

gterzian Oct 6, 2019

Author Member

I slipped-in one change, which is to wake-up only one thread here, and then add a call to notify the next in line at https://github.com/servo/servo/pull/24318/files#diff-aa469beb5619907dbccd88364264b9b8R1131 @asajeffrey

@bors-servo
Copy link
Contributor

bors-servo commented Oct 7, 2019

The latest upstream changes (presumably #24370) made this pull request unmergeable. Please resolve the merge conflicts.

@gterzian gterzian force-pushed the gterzian:http-cache-condvar branch from 3486c1e to edb6d74 Oct 8, 2019
and various small improvements
@gterzian gterzian force-pushed the gterzian:http-cache-condvar branch from edb6d74 to 4f3ba70 Oct 8, 2019
@gterzian
Copy link
Member Author

gterzian commented Oct 8, 2019

Ok this one should be good to go, it does require a r=@asajeffrey which I cannot give.

@gterzian gterzian removed the S-needs-rebase label Oct 8, 2019
@asajeffrey
Copy link
Member

asajeffrey commented Oct 8, 2019

@bors-servo
Copy link
Contributor

bors-servo commented Oct 8, 2019

📌 Commit 4f3ba70 has been approved by asajeffrey

@bors-servo
Copy link
Contributor

bors-servo commented Oct 8, 2019

Testing commit 4f3ba70 with merge c1401f5...

bors-servo added a commit that referenced this pull request Oct 8, 2019
Http cache: wait on pending stores

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

---
<!-- 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 #___ (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/24318)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Oct 8, 2019

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

@bors-servo bors-servo merged commit 4f3ba70 into servo:master Oct 8, 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
@bors-servo bors-servo mentioned this pull request Oct 8, 2019
3 of 4 tasks complete
@asajeffrey
Copy link
Member

asajeffrey commented Oct 8, 2019

Yay!

@gterzian gterzian deleted the gterzian:http-cache-condvar branch Oct 9, 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.

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