cojen / TuplDB

TuplDB is a high-performance, concurrent, transactional, scalable, low-level embedded database.
GNU Affero General Public License v3.0
117 stars 23 forks source link

Demote offline members #82

Closed broneill closed 5 years ago

broneill commented 7 years ago

Group members which aren't available after awhile (configurable) are demoted to observers, facilitating easy replacement when hosts need to be replaced. If the demoted member becomes available again, it will need to ask the leader to update it's role back to what has been configured.

Only the leader can demote members, and it must also get confirmation from a majority that the member to demote is offline. If the member role is already observer, then none of this activity needs to be performed.

broneill commented 5 years ago

This is actually a pretty dangerous feature. A group is defined to ensure that enough copies of the data exist, and anything that automatically removes this redundancy creates a potential for data loss.