File tree 1 file changed +2
-17
lines changed
1 file changed +2
-17
lines changed Original file line number Diff line number Diff line change @@ -190,26 +190,11 @@ func (gc *GC) maybeGC(ctx context.Context, offset uint64) error {
190
190
// Do GC here
191
191
log .Info ("Watermark exceeded. Starting repo GC..." )
192
192
defer log .EventBegin (ctx , "repoGC" ).Done ()
193
- // 1 minute is sufficient for ~1GB unlink() blocks each of 100kb in SSD
194
- _ctx , cancel := context .WithTimeout (ctx , time .Duration (gc .SlackGB )* time .Minute )
195
- defer cancel ()
196
193
197
- if err := GarbageCollect (gc .Node , _ctx ); err != nil {
194
+ if err := GarbageCollect (gc .Node , ctx ); err != nil {
198
195
return err
199
196
}
200
- newStorage , err := gc .Repo .GetStorageUsage ()
201
- if err != nil {
202
- return err
203
- }
204
- log .Infof ("Repo GC done. Released %s\n " , humanize .Bytes (uint64 (storage - newStorage )))
205
- if newStorage > gc .StorageGC {
206
- log .Warningf ("post-GC: Watermark still exceeded" )
207
- if newStorage > gc .StorageMax {
208
- err := ErrMaxStorageExceeded
209
- log .Error (err )
210
- return err
211
- }
212
- }
197
+ log .Infof ("Repo GC done. See `ipfs repo stat` to see how much space got freed.\n " )
213
198
}
214
199
return nil
215
200
}
You can’t perform that action at this time.
0 commit comments