Skip to content

Commit

Permalink
resolved comments
Browse files Browse the repository at this point in the history
Signed-off-by: Xiaoxuan Wang <[email protected]>
  • Loading branch information
wangxiaoxuan273 committed Oct 7, 2023
1 parent 178cd91 commit a332e4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/graph/deletablememory.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ func (m *DeletableMemory) Predecessors(_ context.Context, node ocispec.Descripto

// Remove removes the node from its predecessors and successors.
func (m *DeletableMemory) Remove(ctx context.Context, node ocispec.Descriptor) error {
nodeKey := descriptor.FromOCI(node)
m.lock.Lock()
defer m.lock.Unlock()
nodeKey := descriptor.FromOCI(node)
// remove the node from its successors' predecessor list
for successorKey := range m.successors[nodeKey] {
m.predecessors[successorKey].Delete(nodeKey)
Expand Down

0 comments on commit a332e4a

Please sign in to comment.