-
Notifications
You must be signed in to change notification settings - Fork 210
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2567: Guard pool metadata fetch result persistence with settings status r=rvl a=KtorZ # Issue Number <!-- Put here a reference to the issue that this PR relates to and which requirements it tackles. Jira issues of the form ADP- will be auto-linked. --> ADP-634 # Overview <!-- Detail in a few bullet points the work accomplished in this PR --> - Guard pool metadata fetch result persistence with settings status Since #2432 (concurrent pool metadata fetching), the fetching of metadata is now done in new short-lived threads forked from the 'fetchMetadata' thread worker. Killing the parent thread 'fetchMetadata' does not actually kill child threads which may still complete afterwards. As a consequence, when changing settings from smash (or direct) to none, in-flight requests spawned in short-lived thread may still resolve even if the 'fetchMetadata' loop has been terminated. This commit makes sure to only write the result of requests if and only if the settings haven't changed since the parent thread was launched. This should prevent short-lived thread to update the database after the parent is killed when changing settings. Co-authored-by: KtorZ <matthias.benkort@gmail.com> Co-authored-by: Piotr Stachyra <piotr.stachyra@iohk.io>
- Loading branch information
Showing
5 changed files
with
49 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters