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

Implement read quorum #369

Merged
9 commits merged into from
Jun 14, 2022
Merged

Implement read quorum #369

9 commits merged into from
Jun 14, 2022

Conversation

ghost
Copy link

@ghost ghost commented Jun 8, 2022

Description

This PR makes P2P calls more consistent by requesting multiple nodes using read quorum.
It manages the conflict resolution through custom function.

This should bring more consistency by reducing stale data.

Fixes #332

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@ghost ghost added feature New feature request P2P Involve P2P networking labels Jun 8, 2022
@ghost ghost changed the base branch from master to develop June 8, 2022 21:05
@ghost ghost force-pushed the implement_read_quorum branch 4 times, most recently from dc3e16b to 86c07c3 Compare June 9, 2022 07:59
@ghost ghost self-assigned this Jun 9, 2022
@ghost ghost changed the title Implement read quorum Add P2P atomic reads Jun 9, 2022
@ghost ghost force-pushed the implement_read_quorum branch 2 times, most recently from 19a71ec to ec90345 Compare June 13, 2022 08:25
@ghost ghost changed the title Add P2P atomic reads Implement read quorum Jun 13, 2022
@ghost ghost marked this pull request as ready for review June 13, 2022 08:37
@ghost ghost requested a review from Neylix June 13, 2022 08:37
@ghost ghost force-pushed the implement_read_quorum branch from ec90345 to bdb8f49 Compare June 13, 2022 20:00
lib/archethic/transaction_chain.ex Outdated Show resolved Hide resolved
@ghost ghost force-pushed the implement_read_quorum branch from bdb8f49 to 3fdfc53 Compare June 14, 2022 09:15
Samuel added 9 commits June 14, 2022 22:04
Define a new function in the P2P module to handle message sending to
multiple nodes and handle reads using monotonic quorum reads.

The closest node is used to fetch the first results and others results
are fetched from a subgroup defined by a consistency level argument.

The results should be newer than the prior one, based on some conflict
resolver function passsed as argument.
@ghost ghost force-pushed the implement_read_quorum branch from 3fdfc53 to f2dc84e Compare June 14, 2022 20:05
@ghost ghost merged commit 0629896 into develop Jun 14, 2022
@ghost ghost deleted the implement_read_quorum branch June 14, 2022 20:21
@ghost ghost mentioned this pull request Jun 27, 2022
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature request P2P Involve P2P networking
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support read quorum for P2P
1 participant