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

P2P pubsub update transaction retry and serialization. #1028

Closed
fredcarle opened this issue Jan 12, 2023 · 0 comments · Fixed by #1056
Closed

P2P pubsub update transaction retry and serialization. #1028

fredcarle opened this issue Jan 12, 2023 · 0 comments · Fixed by #1056
Assignees
Milestone

Comments

@fredcarle
Copy link
Collaborator

Currently, concurrent updates on the P2P system are using ProcessLog also concurrently and may cause transaction conflicts. We should refactor the process to potentially use channels for serialization and handle transaction retries within ProcessNode.

@fredcarle fredcarle transferred this issue from sourcenetwork/docs.source.network Jan 13, 2023
@fredcarle fredcarle self-assigned this Jan 25, 2023
@fredcarle fredcarle added this to the DefraDB v0.5 milestone Jan 25, 2023
fredcarle added a commit that referenced this issue Jan 28, 2023
Relevant issue(s)
Resolves #1028
Resolves #470
Resolves #1053

Description
The main purpose of this PR is to resolve the potential deadlock. The deadlock can happen if a PushLog cycle doesn't receive the whole missing block history before an error occurs. This leaves the DAG incomplete but there is no clear way, at the moment, for Defra to be aware of that and for it to try to fill in the gap at some point.

To solve the deadlock situation, John and I had discussed implementing a transaction that would cover the whole PushLog cycle. This means that any error occurring during the cycle will discard the transaction and thus leave the DAG unaffected.

As side effects, we add thread safety to the badger transactions and we manage DAG workers on a per PushLog cycle basis.
shahzadlone pushed a commit that referenced this issue Apr 13, 2023
Relevant issue(s)
Resolves #1028
Resolves #470
Resolves #1053

Description
The main purpose of this PR is to resolve the potential deadlock. The deadlock can happen if a PushLog cycle doesn't receive the whole missing block history before an error occurs. This leaves the DAG incomplete but there is no clear way, at the moment, for Defra to be aware of that and for it to try to fill in the gap at some point.

To solve the deadlock situation, John and I had discussed implementing a transaction that would cover the whole PushLog cycle. This means that any error occurring during the cycle will discard the transaction and thus leave the DAG unaffected.

As side effects, we add thread safety to the badger transactions and we manage DAG workers on a per PushLog cycle basis.
shahzadlone pushed a commit to shahzadlone/defradb that referenced this issue Feb 23, 2024
Relevant issue(s)
Resolves sourcenetwork#1028
Resolves sourcenetwork#470
Resolves sourcenetwork#1053

Description
The main purpose of this PR is to resolve the potential deadlock. The deadlock can happen if a PushLog cycle doesn't receive the whole missing block history before an error occurs. This leaves the DAG incomplete but there is no clear way, at the moment, for Defra to be aware of that and for it to try to fill in the gap at some point.

To solve the deadlock situation, John and I had discussed implementing a transaction that would cover the whole PushLog cycle. This means that any error occurring during the cycle will discard the transaction and thus leave the DAG unaffected.

As side effects, we add thread safety to the badger transactions and we manage DAG workers on a per PushLog cycle basis.
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 a pull request may close this issue.

1 participant