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

Godcr stuck in cancel sync #775

Closed
wants to merge 2 commits into from
Closed

Conversation

crux25
Copy link
Contributor

@crux25 crux25 commented Jan 27, 2022

This PR close issue #728 and #765.

Comment on lines +994 to +1156
// Wallet notifications. Currently we are interested in reading from
// NotificationsUpdate channel, to prevent the channel from getting
// filled thereby blocking Wallet create/delete actions.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to me that this is a bad design. Why do we have this channel in the first place and why do we need to drain it this way to prevent it from blocking?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The channel provides sync status updates mainly used by the overview page. If it navigates away from the overview page the channel is no longer consumed, the channel gets filled up and block.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see use cases on the wallet page too. e.g Updating the status of operations on the UI, but that's beyond the scope of the current task.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'd be better for pages that require such updates to create the channel and close it when done with it. A universal channel that is not always used and could become blocked isn't ideal. I'll propose some changes in a moment.

Copy link
Contributor Author

@crux25 crux25 Jan 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'd be better for pages that require such updates to create the channel and close it when done with it. A universal channel that is not always used and could become blocked isn't ideal. I'll propose some changes in a moment.

I had thought about that, but a single universal channel is used to deliver tx/mixer/politeia/sync/rescan notifications. Changes will require breaking this up into units, so pages can create the units they need and close them on exit. This changes the scope of the task from fixing the bugs mentioned in the PR to refactoring the channels used to deliver notifications. Pointing that out before I proceed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants