You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Therefore, if a frugalos_mds::node is down, then we can never delete objects in the frugslos_mds::node. This leads to make unreachable objects on the device that handles the frugalos_mds::node.
Note: We can put/get an object to/from the frugslos_mds::node.
Description
We can break the following precondition of the
handle_committed
method:frugalos/frugalos_mds/src/node/node.rs
Line 478 in 4b9ca1e
Reproduce
Use these files: https://gist.github.com/yuezato/9c0af68320935b342d0b152811f58cfc
Why is the precondition broken
In this while-loop:
https://github.com/frugalos/frugalos/blob/master/frugalos_mds/src/node/node.rs#L729-L738
here we assume the two raft events
[ Event::SnapshotLoaded, Event::Committed ]
come in this order.First, we deal the
Event::SnapshotLoaded
frugalos/frugalos_mds/src/node/node.rs
Lines 449 to 464 in 4b9ca1e
without updating
self.next_commit
.Immediately after receiving
Event::Committed
, we reach this line:frugalos/frugalos_mds/src/node/node.rs
Line 478 in 4b9ca1e
Finally, the precondition is broken.
How Solve This
Once we encounter a
SnapshotLoaded
event,we should wait to deal committed events that follows the loaded event among decoding the snapshot.
Indeed, in this part (Especially line 704)
frugalos/frugalos_mds/src/node/node.rs
Lines 688 to 709 in 4b9ca1e
we can correctly update
self.next_commit
and this maybe solve the present issue.The text was updated successfully, but these errors were encountered: