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

Use selective receive to allow for vnode to be blocked #27

Merged
merged 3 commits into from
Apr 9, 2024

Conversation

martinsumner
Copy link

Block and unblock a vnode when triggering a repair. Otherwise their is a potential race condition:

  • aae_controller is triggered into repair mode, queueing all updates to be re-applied after rebuild complete
  • update is applied to leveled backend by vnode
  • snapshot is taken for rebuild (including update)
  • message is cast to aae_controller with update ... which will be queued and applied twice
  • update is queue

Block and unblock a vnode when triggering a repair.  Otherwise their is a potential race condition:

- aae_controller is triggered into repair mode, queueing all updates to be re-applied after rebuild complete
- update is applied to leveled backend by vnode
- snapshot is taken for rebuild (including update)
- message is cast to aae_controller with update ... which will be queued and applied twice
- update is queue
If the selective receive times out - then need to handle the release message
@ThomasArts
Copy link

Looks good.

It could be a good idea to make BlockTimeMS configurable and then also to add a test in which you configure it to 0 and show that the system in effect is running the older asynchronous behaviour without blocking.

@martinsumner martinsumner marked this pull request as ready for review April 4, 2024 11:40
@martinsumner
Copy link
Author

OpenRiak/riak_test#16

@martinsumner martinsumner merged commit 0c060a3 into nhse-develop Apr 9, 2024
3 checks passed
@martinsumner martinsumner deleted the nhse-d32-nhskv.i25-lockvnode branch April 9, 2024 14:30
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.

2 participants