Skip to content

Commit

Permalink
Merge pull request #628 from Iceber/log_stream_handle
Browse files Browse the repository at this point in the history
add logging with stream handling enabled
  • Loading branch information
Iceber authored Dec 26, 2023
2 parents a425943 + 6e3ff61 commit b4117dd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/synchromanager/clustersynchro/informer/reflector.go
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,7 @@ func (r *Reflector) list(stopCh <-chan struct{}) error {
initTrace.Step("Resource version extracted")

if len(itemKeys) != 0 {
klog.V(4).Infof("%s: list resources<%v> with stream handling for paginated list", r.name, r.expectedTypeName)
if err := r.syncWithKeys(itemKeys, resourceVersion); err != nil {
return fmt.Errorf("unable to sync list result: %v", err)
}
Expand All @@ -476,6 +477,10 @@ func (r *Reflector) list(stopCh <-chan struct{}) error {
return fmt.Errorf("unable to understand list result %#v (%v)", list, err)
}
initTrace.Step("Objects extracted")

if r.StreamHandleForPaginatedList {
klog.V(3).Infof("%s: list %v resources<%v> without stream handling, although StreamHandleForPaginatedList is enabled", r.name, len(items), r.expectedTypeName)
}
if err := r.syncWith(items, resourceVersion); err != nil {
return fmt.Errorf("unable to sync list result: %v", err)
}
Expand Down

0 comments on commit b4117dd

Please sign in to comment.