File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -622,7 +622,18 @@ func (p *Blox) Start(ctx context.Context) error {
622622 if p .topicName != "0" {
623623 shortCtx , shortCtxCancel := context .WithDeadline (p .ctx , time .Now ().Add (60 * time .Second ))
624624 defer shortCtxCancel ()
625- p .rpc .Request ("repo/gc" ).Send (shortCtx )
625+ // Skip GC if fula-pinning is actively syncing
626+ syncingPath := "/internal/fula-pinning/.syncing"
627+ skipGC := false
628+ if info , err := os .Stat (syncingPath ); err == nil {
629+ if time .Since (info .ModTime ()) < 30 * time .Minute {
630+ log .Info ("Skipping repo/gc: fula-pinning sync in progress" )
631+ skipGC = true
632+ }
633+ }
634+ if ! skipGC {
635+ p .rpc .Request ("repo/gc" ).Send (shortCtx )
636+ }
626637 storedLinks , err := p .ListModifiedStoredBlocks (lastCheckedTime )
627638 if err != nil {
628639 log .Errorf ("Error listing stored blocks: %v" , err )
You can’t perform that action at this time.
0 commit comments