| commit | bbeeee5df5e3fb1c96ba519ee6b718579c6c9355 | [log] [tgz] |
|---|---|---|
| author | Paul Daniel Faria <paulfaria@fuchsia.infra.roller.google.com> | Mon Jun 14 17:31:38 2021 +0000 |
| committer | Copybara-Service <copybara-worker@google.com> | Mon Jun 14 10:32:25 2021 -0700 |
| tree | 05c14677969ab4f6161c81944f982c2777bf761c | |
| parent | 788b86cd8be594cb01d1f5254d73f08042318738 [diff] |
[roll] Roll fuchsia [setui][jobs] Make Manager's job_futures unordered This CL changes the type of job::Manager::job_futures to FuturesUnordered from FuturesOrdered. job_futures maintains a collection of futures which are representing streams from external fidl connections. When job_futures is FuturesOrdered, this adds a constraint that the futures will only be recognized as completed in the order they were added to the collection. This causes a problem when multiple clients connect to the service and the first one to connect performs a hanging get. Its stream of requests is pending when the second client connects. The second client's stream will be added to job_futures, and it may have a request ready but it cannot be processed because job_futures is still waiting for the next request from the first client, which might never come. By switching to FuturesUnordered, we can pick up work as it becomes available. The ordering of requests from a client is still maintained because we process those from the stream, which maintains the order. It is only the requests across clients which become unordered. This CL also fixes issues with the existing test and adds a new test case to handle the above scenario. An unbounded channel was used in place of the FuturesOrdered (separate from the one discussed above) because they have different behavior when the end is reached. When the last item in FuturesOrdered is reached, the source is considered closed and not placed back onto the job_futures collection. When a channel is used, it's still considered open and so is put back onto the job_futures collection. Original-Fixed: 78623 Tests: fx test -o setui_service_tests Multiply: setui_service_tests Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/542401 Original-Revision: dab6b213610d96279ce916cc205bddcda0b7fccd GitOrigin-RevId: 88d3ce2fe5753daa635a015dd92ed7f50f3e7b13 Change-Id: I8a5cdb7059144cf260fea2477da8f2563a8f0675
This repository contains Fuchsia's Global Integration manifest files.
All changes should be made to the internal version of this repository. Our infrastructure automatically updates this version when the internal one changes.
Currently all changes must be made by a Google employee. Non-Google employees wishing to make a change can ask for assistance via the IRC channel #fuchsia on Freenode.
First install Jiri.
Next run:
$ jiri init $ jiri import minimal https://fuchsia.googlesource.com/integration $ jiri update
Third party projects should have their own subdirectory in ./third_party.