Closed qieziting closed 6 months ago
iirc, PrepareSnapshot
and SaveSnapshot
are only called during compaction for regular state machines and not for on-disk state machines. You should see a call to Sync
instead. This makes sense because the replica's snapshot is already present on disk.
If you joined a new replica to the shard, you would likely see calls to PrepareSnapshot
and SaveSnapshot
to initialize the state of the new replica.
Thanks for your answer.
If you joined a new replica to the shard, you would likely see calls to PrepareSnapshot and SaveSnapshot to initialize the state of the new replica.
I have try this one, and they are called.
Thank you very much.
Dragonboat version
github.com/lni/dragonboat/v3 v3.3.8
Expected behavior
Call the following 3 function as expected:
Actual behavior
Not called
Steps to reproduce the behavior
For I need to use v3 dragonboat in my project, so I changed the version of dragonboat in example to v3.3.8. Then I add some logger in the three fuction, such as:
Then I try to execute it, got following log:
It looks like that logic of snapshot in dragonboat has been called, but
PrepareSnapshot
andSaveSnapshot
aren't called. Could you check it? Thank you.