-
Notifications
You must be signed in to change notification settings - Fork 19
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
[Messages] Sync job #285
Open
odesenfans
wants to merge
3
commits into
aleph-im:dev
Choose a base branch
from
odesenfans:od-message-sync-job
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[Messages] Sync job #285
Conversation
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
odesenfans
force-pushed
the
od-message-sync-job
branch
from
May 24, 2022 14:23
a88ffff
to
b80581f
Compare
Fixed an issue where the pending message job would block on the final messages in the queue and stop processing newer messages. Once the job finishes the loop on all the messages in the pending message collection, the previous implementation waits until all the message tasks finish. This causes a delay of several hours until the node finishes these tasks and is able to process newer pending messages again. Messages end up being processed, but far later than expected. The issue arises because we never remove messages from the pending queue if we fail to retrieve the associated content. The job then always has messages in the queue, causing the issue. Fixed the issue by allowing the loop to restart without waiting for messages to be processed. We now compute an individual ID for each pending message and add it to a set. The job will simply ignore any message that is already being processed, allowing for newer messages to be taken into account.
odesenfans
force-pushed
the
od-message-sync-job
branch
from
June 14, 2022 13:17
b80581f
to
8f0bdef
Compare
Added a new job that synchronizes unconfirmed messages across the network. The goal of this job is to re-send messages missed by nodes with the ability to push data on-chain. This can happen because of various issues like server downtimes or bugs. This job works in three parts: * the publisher task periodically sends the list of all the messages older than the last TX block that have yet to be confirmed by on-chain data. * the receiver task stores the list of unconfirmed messages for each peer detected on the network. * the sync/aggregator task aggregates the confirmation data from all the nodes and fetches messages using the HTTP API. These messages are added to the pending message queue. This solution is less expensive that constantly sharing all the messages across all the nodes and guarantees that the network will be synchronized eventually as long as the on-chain data synchronization jobs are working. With the current implementation, a message can remain out of sync at a maximum until a new TX is published on-chain + the job period (5 minutes currently).
odesenfans
force-pushed
the
od-message-sync-job
branch
from
June 14, 2022 13:21
8f0bdef
to
2df8d7b
Compare
odesenfans
force-pushed
the
dev
branch
2 times, most recently
from
March 21, 2023 13:43
d9f920c
to
3d016e0
Compare
odesenfans
force-pushed
the
dev
branch
2 times, most recently
from
October 27, 2023 17:03
48b3f90
to
11bf24a
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Added a new job that synchronizes unconfirmed messages across
the network. The goal of this job is to re-send messages missed
by nodes with the ability to push data on-chain. This can happen
because of various issues like server downtime or bugs.
This job works in three parts:
older than the last TX block that have yet to be confirmed by
on-chain data.
each peer detected on the network.
all the nodes and fetches messages using the HTTP API.
These messages are added to the pending message queue.
This solution is less expensive that constantly sharing all
the messages across all the nodes and guarantees that the network
will be synchronized eventually as long as the on-chain data
synchronization jobs are working. With the current implementation,
a message can remain out of sync at a maximum until a new TX
is published on-chain + the job period (5 minutes currently).