Skip to content

Commit

Permalink
resolved comments
Browse files Browse the repository at this point in the history
Signed-off-by: Xiaoxuan Wang <wangxiaoxuan119@gmail.com>
  • Loading branch information
wangxiaoxuan273 committed Dec 27, 2023
1 parent 32ea58e commit 24e320e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions content/oci/oci.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,10 @@ type Store struct {
AutoSaveIndex bool

// AutoGC controls if the OCI store will automatically clean newly produced
// dangling nodes during Delete() operation.
// - If AutoGC is set to false, it's the user's responsibility to manually
// delete the dangling nodes.
// dangling nodes during Delete() operation. Dangling nodes are those without
// any predecessors, such as blobs whose manifests have been deleted.
// - If AutoGC is set to false, then new dangling nodes are not automatically
// cleaned up during Delete().
// - Default value: true.
AutoGC bool

Expand Down Expand Up @@ -157,7 +158,7 @@ func (s *Store) Delete(ctx context.Context, target ocispec.Descriptor) error {
s.sync.Lock()
defer s.sync.Unlock()

// delete one node
// delete the node itself
danglings, err := s.delete(ctx, target)
if err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion internal/graph/memory.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ type Memory struct {
// 1. a node exists in Memory.predecessors if it has at least one predecessor
// in the memory, regardless of whether or not the node itself exists in
// the memory.
// 2. a node does not exist in Memory.nodes, if it doesn't have any predecessors
// 2. a node does not exist in Memory.predecessors, if it doesn't have any predecessors
// in the memory.
// - Memory.successors:
// 1. a node exists in Memory.successors if and only if it exists in the memory.
Expand Down

0 comments on commit 24e320e

Please sign in to comment.