Unified Storage: Update index when indexqueueprocessor exists (#109351)
* Update readme * When queue processor already exists, update the index on it in case it has been closed. * Adds regression test.
This commit is contained in:
@@ -943,6 +943,8 @@ func (s *searchSupport) getOrCreateIndexQueueProcessor(index ResourceIndex, nsr
|
||||
|
||||
key := fmt.Sprintf("%s/%s/%s", nsr.Namespace, nsr.Group, nsr.Resource)
|
||||
if indexQueueProcessor, ok := s.indexQueueProcessors[key]; ok {
|
||||
// index stored on existing processor may have been closed and rebuilt, so we need to update it
|
||||
indexQueueProcessor.index = index
|
||||
return indexQueueProcessor, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user