Skip to content
This repository has been archived by the owner on Feb 3, 2025. It is now read-only.

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

@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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants