eBay / HomeStore

Storage Engine for block and key/value stores.
Apache License 2.0
23 stars 21 forks source link

nuraft param with_log_sync_stopping_gap causes new follower to stop resync #561

Closed sanebay closed 1 week ago

sanebay commented 2 months ago

https://github.com/eBay/HomeStore/pull/546/files [Uploading not-working.tar.gz…]()

xiaoxichen commented 2 months ago

@sanebay logs are not downloadable

sanebay commented 2 months ago

For some reason, its stuck at uploading. I will paste in the internal channel.

xiaoxichen commented 1 week ago

This issue is mostly due to nuraft will use log pack to sync the new follower till the new follower catch up to log_sync_stopping_gap, however , in HomeStore we localize the journal entries , there is no callback available in log pack path, the log from leader will be added as-is to the HomeStore which is obviously wrong.

The #546 make log_sync_stopping_gap to default 99999 which is larger than any of the written IO counts in our UTs that avoid the log pack sync.

587 set it to max_int32 as well as enable the learner feature, with the learner feature new member will not go through log pack in any case.