Skip to content

Commit 2840dd8

Browse files
authored
Merge pull request #50 from wackxu/patch-1
fix WaitForCacheSync and initializeCaches bug
2 parents 6341e4c + a32313c commit 2840dd8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/controller/snapshot_controller_base.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ func (ctrl *csiSnapshotController) Run(workers int, stopCh <-chan struct{}) {
139139
glog.Infof("Starting CSI snapshotter")
140140
defer glog.Infof("Shutting CSI snapshotter")
141141

142-
if !cache.WaitForCacheSync(stopCh, ctrl.snapshotListerSynced, ctrl.contentListerSynced) {
142+
if !cache.WaitForCacheSync(stopCh, ctrl.snapshotListerSynced, ctrl.contentListerSynced, ctrl.classListerSynced) {
143143
glog.Errorf("Cannot sync caches")
144144
return
145145
}
@@ -475,8 +475,8 @@ func (ctrl *csiSnapshotController) initializeCaches(snapshotLister storagelister
475475
}
476476
for _, content := range contentList {
477477
contentClone := content.DeepCopy()
478-
if _, err = ctrl.storeSnapshotUpdate(contentClone); err != nil {
479-
glog.Errorf("error updating volume snapshot cache: %v", err)
478+
if _, err = ctrl.storeContentUpdate(contentClone); err != nil {
479+
glog.Errorf("error updating volume snapshot content cache: %v", err)
480480
}
481481
}
482482

0 commit comments

Comments
 (0)