decouple SyncGapTime from wait time

This commit is contained in:
vyzo 2022-02-01 10:55:15 +02:00
parent fd07ca87ce
commit 6353fa72d8
2 changed files with 6 additions and 2 deletions

View File

@ -49,6 +49,9 @@ var (
// SyncGapTime is the time delay from a tipset's min timestamp before we decide
// there is a sync gap
SyncGapTime = time.Minute
// SyncWaitTime is the time delay before compaction starts purging
SyncWaitTime = SyncGapTime
)
var (
@ -661,8 +664,8 @@ func (s *SplitStore) doCompact(curTs *types.TipSet) error {
}
// wait for the head to catch up so that all messages are protected
log.Infof("waiting %s for sync", SyncGapTime)
time.Sleep(SyncGapTime)
log.Infof("waiting %s for sync", SyncWaitTime)
time.Sleep(SyncWaitTime)
checkpoint, err := NewCheckpoint(s.checkpointPath())
if err != nil {

View File

@ -29,6 +29,7 @@ func init() {
CompactionThreshold = 5
CompactionBoundary = 2
WarmupBoundary = 0
SyncWaitTime = time.Millisecond
logging.SetLogLevel("splitstore", "DEBUG")
}