dropLocked removes any accounting for key (used when an overwrite is about to replace the file under it) so currentSize doesn't double-count. No-op if the key isn't tracked. Caller holds c.mu.
(key string)
| 334 | if option.SummaryMemoryLimitBytes > 0 { |
| 335 | if err := validateSummaryMemoryLimit(option.SummaryMemoryLimitBytes, summaryCapacity); err != nil { |
| 336 | return nil, err |
| 337 | } |
| 338 | } |
| 339 | dc.summary = newSummaryIndexWithParams(summaryCapacity.BitCount, summaryCapacity.Hashes, int(summaryCapacity.DesignEntries)) |
| 340 | // The disk target is not known until after the bounded startup scan and |
| 341 | // statfs sample. Rehash the already bounded exact index once into the |
| 342 | // selected fixed or dynamic layout so restart snapshots cannot omit keys. |
| 343 | rehashed := 0 |
| 344 | for element := dc.order.Front(); element != nil; element = element.Next() { |
| 345 | if rehashed%startupScanChunkSize == 0 { |
| 346 | if option.summaryRehashHook != nil { |
| 347 | option.summaryRehashHook(rehashed) |