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

Redesign mailbox msg #4784

Merged
merged 2 commits into from
Nov 12, 2020

Conversation

chimp1984
Copy link
Contributor

@chimp1984 chimp1984 commented Nov 12, 2020

This PR fixes an issue with not removed mailbox messages from the trade process.
I redesigned the way how we remove the messages. Instead of removing it from the network after successful processing we remove it immediately when we received it after the listeners are called. We keep it locally stored so in case the client was not ready to process it at that moment it requests the data later. We also persist the messages for the edge case that the user shuts down the app before the client was ready for processing. In that case the message wuld be lost if not persisted as it was removed from the network but only kept in RAM for later access which is lost at restart. By persisting the data we get them again at restart.
After processing we also try to remove the data if still in the P2PDataStorage to be sure that the message got removed from the network if the initial removal failed because we have not been bootstrapped.

By removing the messages at receipt we can expect that the number of messages will go down quite a lot. Currently its about 1000, normally it was about 400-600. I guess after that release and when old messages have been cleaned from TTL we might have only about 200-300 messages in the network.

This PR did only the minimum of changes to limit risks for this release. We should clean up later a bit more and continue refactoring the mailbox message handling so it gets more robust and uniform.

Copy link
Contributor

@ripcurlx ripcurlx left a comment

Choose a reason for hiding this comment

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

utACK

@ripcurlx ripcurlx merged commit 6e23649 into bisq-network:release/v1.5.0 Nov 12, 2020
Copy link
Member

@sqrrm sqrrm left a comment

Choose a reason for hiding this comment

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

utACK

@chimp1984 chimp1984 deleted the redesign-mailbox-msg branch November 12, 2020 16:32
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