Allow indexers to be added after an informer start
Both SharedIndexInformer and threadSafeMap were changed to allow
AddIndexers to be called after a start or items are in the cache. While a
new Indexer is being added handling deltas is blocked in the informer.
When a new Indexer is added to a cache with existing items all indices
are recalculated.
One point to note is that adding a new indexer on a started informer
will case all indexes to be rebuilt, but it will not trigger an
updateNotification. This is done because it is impractical to assume
any existing ResourceEventHandler would have knowledge of a yet to be
added index. Any ResourceEventHandler that would need to consume this
new index should be added after the new Indexer is added.
Showing
Please
register
or
sign in
to comment