storj/satellite/gc/doc.go
Natalie Villasana f11413bc8e Implement garbage collection on satellite (#2577)
* Added a gc package at satellite/gc, which contains the gc.Service, which runs garbage collection integrated with the metainfoloop, and the gc PieceTracker, which implements the metainfo loop Observer interface and stores all of the filters (about which pieces are good) for each node.
* Added a gc config located at satellite/gc/service.go (loop disabled by default in release)
* Creates bloom filters with pieces to be retained inside the metainfo loop
* Sends RetainRequests (or filters with good piece ids) to all storage nodes.
2019-07-24 13:26:43 -04:00

22 lines
836 B
Go

// Copyright (C) 2019 Storj Labs, Inc.
// See LICENSE for copying information.
/*
Package gc contains the functions needed to run garbage collection.
The gc.PieceTracker implements the metainfo loop Observer interface
allowing us to subscribe to the loop to get information for every segment
in the metainfo database.
The gc.PieceTracker handling functions are used by the gc.Service to periodically
account for all existing pieces on storage nodes and create "retain requests"
which contain a bloom filter of all pieces that possibly exist on a storage node.
The gc.Service will send that request to the storagenode after a full metaloop
iteration, and the storage node will use that request to delete the "garbage" pieces
that are not in the bloom filter.
See storj/docs/design/garbage-collection.md for more info.
*/
package gc