This repository was archived by the owner on Aug 18, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 631
Conversation
This file contains hidden or 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
3994: [CDEC-658] simplify threading in block streaming r=avieth a=avieth If there is a connection problem causing the block streaming conversation to fail even to come up, then the retrieval worker will hang, because the block streaming `TBQueue` will never show `StreamEnd`: this is done in the `finally` clauses of the conversation callbacks _themselves_ rather than the conversation at large (they never started in this case). The solution in this pull request is to do the queue sourcing (`retrieveBlocks`) as well as the queue sinking (`processBlocks`) from within the conversation callback itself, by way of `concurrently`. If the conversation fails to even come up, then the exception will come through, and the retrieval worker will carry on. A bit more detail on how this arose: it required a network failure while _streaming_ blocks, rather than just fetching the next one, so it was a bit more rare than might be expected. I'd like to make a test case for this, but it's difficult, because it requires a network failure at a particular moment. The node must be able to get the header announcements, but the network needs to go down as soon as it attempts to make a connection from streaming blocks. The first two commits are not strictly related, but I had them around because I need them in order to build cardano-sl as a dependency. I can drop them if somebody really feels strongly that I should, but I'll need to merge them anyway. https://iohk.myjetbrains.com/youtrack/issue/CDEC-658 Co-authored-by: Alexander Vieth <[email protected]>
Did you mean "r+"? |
bors r+ |
👎 Rejected by too few approved reviews |
disassembler
approved these changes
Jan 14, 2019
bors r+ |
iohk-bors bot
added a commit
that referenced
this pull request
Jan 14, 2019
3998: [CDEC-658] port to release/2.0.1 r=avieth a=avieth Cherry-picked merge commit. 3994: [CDEC-658] simplify threading in block streaming r=avieth a=avieth If there is a connection problem causing the block streaming conversation to fail even to come up, then the retrieval worker will hang, because the block streaming `TBQueue` will never show `StreamEnd`: this is done in the `finally` clauses of the conversation callbacks _themselves_ rather than the conversation at large (they never started in this case). The solution in this pull request is to do the queue sourcing (`retrieveBlocks`) as well as the queue sinking (`processBlocks`) from within the conversation callback itself, by way of `concurrently`. If the conversation fails to even come up, then the exception will come through, and the retrieval worker will carry on. A bit more detail on how this arose: it required a network failure while _streaming_ blocks, rather than just fetching the next one, so it was a bit more rare than might be expected. I'd like to make a test case for this, but it's difficult, because it requires a network failure at a particular moment. The node must be able to get the header announcements, but the network needs to go down as soon as it attempts to make a connection from streaming blocks. The first two commits are not strictly related, but I had them around because I need them in order to build cardano-sl as a dependency. I can drop them if somebody really feels strongly that I should, but I'll need to merge them anyway. https://iohk.myjetbrains.com/youtrack/issue/CDEC-658 Co-authored-by: Alexander Vieth <[email protected]> ## Description <!--- A brief description of this PR and the problem is trying to solve --> ## Linked issue <!--- Put here the relevant issue from YouTrack --> Co-authored-by: iohk-bors[bot] <iohk-bors[bot]@users.noreply.github.com> Co-authored-by: Alexander Vieth <[email protected]>
Timed out |
bors r+ |
iohk-bors bot
added a commit
that referenced
this pull request
Jan 15, 2019
3998: [CDEC-658] port to release/2.0.1 r=avieth a=avieth Cherry-picked merge commit. 3994: [CDEC-658] simplify threading in block streaming r=avieth a=avieth If there is a connection problem causing the block streaming conversation to fail even to come up, then the retrieval worker will hang, because the block streaming `TBQueue` will never show `StreamEnd`: this is done in the `finally` clauses of the conversation callbacks _themselves_ rather than the conversation at large (they never started in this case). The solution in this pull request is to do the queue sourcing (`retrieveBlocks`) as well as the queue sinking (`processBlocks`) from within the conversation callback itself, by way of `concurrently`. If the conversation fails to even come up, then the exception will come through, and the retrieval worker will carry on. A bit more detail on how this arose: it required a network failure while _streaming_ blocks, rather than just fetching the next one, so it was a bit more rare than might be expected. I'd like to make a test case for this, but it's difficult, because it requires a network failure at a particular moment. The node must be able to get the header announcements, but the network needs to go down as soon as it attempts to make a connection from streaming blocks. The first two commits are not strictly related, but I had them around because I need them in order to build cardano-sl as a dependency. I can drop them if somebody really feels strongly that I should, but I'll need to merge them anyway. https://iohk.myjetbrains.com/youtrack/issue/CDEC-658 Co-authored-by: Alexander Vieth <[email protected]> ## Description <!--- A brief description of this PR and the problem is trying to solve --> ## Linked issue <!--- Put here the relevant issue from YouTrack --> Co-authored-by: iohk-bors[bot] <iohk-bors[bot]@users.noreply.github.com> Co-authored-by: Alexander Vieth <[email protected]>
Timed out |
bors r+ |
iohk-bors bot
added a commit
that referenced
this pull request
Jan 15, 2019
3998: [CDEC-658] port to release/2.0.1 r=disassembler a=avieth Cherry-picked merge commit. 3994: [CDEC-658] simplify threading in block streaming r=avieth a=avieth If there is a connection problem causing the block streaming conversation to fail even to come up, then the retrieval worker will hang, because the block streaming `TBQueue` will never show `StreamEnd`: this is done in the `finally` clauses of the conversation callbacks _themselves_ rather than the conversation at large (they never started in this case). The solution in this pull request is to do the queue sourcing (`retrieveBlocks`) as well as the queue sinking (`processBlocks`) from within the conversation callback itself, by way of `concurrently`. If the conversation fails to even come up, then the exception will come through, and the retrieval worker will carry on. A bit more detail on how this arose: it required a network failure while _streaming_ blocks, rather than just fetching the next one, so it was a bit more rare than might be expected. I'd like to make a test case for this, but it's difficult, because it requires a network failure at a particular moment. The node must be able to get the header announcements, but the network needs to go down as soon as it attempts to make a connection from streaming blocks. The first two commits are not strictly related, but I had them around because I need them in order to build cardano-sl as a dependency. I can drop them if somebody really feels strongly that I should, but I'll need to merge them anyway. https://iohk.myjetbrains.com/youtrack/issue/CDEC-658 Co-authored-by: Alexander Vieth <[email protected]> ## Description <!--- A brief description of this PR and the problem is trying to solve --> ## Linked issue <!--- Put here the relevant issue from YouTrack --> Co-authored-by: iohk-bors[bot] <iohk-bors[bot]@users.noreply.github.com> Co-authored-by: Alexander Vieth <[email protected]>
Build succeeded |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Cherry-picked merge commit.
3994: [CDEC-658] simplify threading in block streaming r=avieth a=avieth
If there is a connection problem causing the block streaming conversation to fail even to come up, then the retrieval worker will hang, because the block streaming
TBQueue
will never showStreamEnd
: this is done in thefinally
clauses of the conversation callbacks themselves rather than the conversation at large (they never started in this case).The solution in this pull request is to do the queue sourcing (
retrieveBlocks
) as well as the queue sinking (processBlocks
) from within the conversation callback itself, by way ofconcurrently
. If the conversation fails to even come up, then the exception will come through, and the retrieval worker will carry on.A bit more detail on how this arose: it required a network failure while streaming blocks, rather than just fetching the next one, so it was a bit more rare than might be expected.
I'd like to make a test case for this, but it's difficult, because it requires a network failure at a particular moment. The node must be able to get the header announcements, but the network needs to go down as soon as it attempts to make a connection from streaming blocks.
The first two commits are not strictly related, but I had them around because I need them in order to build cardano-sl as a dependency. I can drop them if somebody really feels strongly that I should, but I'll need to merge them anyway.
https://iohk.myjetbrains.com/youtrack/issue/CDEC-658
Co-authored-by: Alexander Vieth [email protected]
Description
Linked issue
Type of change
Developer checklist
Testing checklist
QA Steps
Screenshots (if available)
How to merge
Send the message
bors r+
to merge this PR. For more information, seedocs/how-to/bors.md
.