Skip to content

Commit a1bd303

Browse files
committed
shorten comment
Signed-off-by: Dr. Jan-Philip Gehrcke <[email protected]>
1 parent f2a857c commit a1bd303

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cmd/compute-domain-daemon/computedomain.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,8 @@ func (m *ComputeDomainManager) Get(uid string) (*nvapi.ComputeDomain, error) {
185185

186186
// onAddOrUpdate handles the addition or update of a ComputeDomain. Here, we
187187
// receive updates not for all CDs in the system, but only for the CD that we
188-
// are registered for (filtered by CD name).
188+
// are registered for (filtered by CD name). Note that the informer triggers
189+
// this callback once upon startup for all existing objects.
189190
func (m *ComputeDomainManager) onAddOrUpdate(ctx context.Context, obj any) error {
190191
// Cast the object to a ComputeDomain object
191192
o, ok := obj.(*nvapi.ComputeDomain)
@@ -210,8 +211,7 @@ func (m *ComputeDomainManager) onAddOrUpdate(ctx context.Context, obj any) error
210211
return nil
211212
}
212213

213-
// Update node info in ComputeDomain
214-
// Why are we doing this (only) upon receiving another update?
214+
// Update node info in ComputeDomain.
215215
if err := m.UpdateComputeDomainNodeInfo(ctx, cd); err != nil {
216216
return fmt.Errorf("error updating node info in ComputeDomain: %w", err)
217217
}

0 commit comments

Comments
 (0)