Draft
Conversation
Contributor
|
JFYI I took the liberty to rebase, fix conflicts and force push. I hope this helps |
| Watch(ctx context.Context, listener Listener) int | ||
| } | ||
|
|
||
| // this is set to a var so that it can be overriden by test code for mocking purposes |
| @@ -1,5 +1,5 @@ | |||
| /* | |||
| Package factory provides a cache factory for the sql-based cache. | |||
| Package factory provides an cache factory for the sql-based cache. | |||
Contributor
There was a problem hiding this comment.
typo: "a cache" is correct
| indexedFields: indexedFields, | ||
| resourceVersionCache: newResourceVersionCache(1000), | ||
| } | ||
| fmt.Println("HITHERE creating list option indexer") |
| // - an error instead of all of the above if anything went wrong | ||
| func (l *ListOptionIndexer) ListByOptions(ctx context.Context, lo ListOptions, partitions []partition.Partition, namespace string) (*unstructured.UnstructuredList, int, string, error) { | ||
| isMaybeStale := lo.Revision != "" && !l.resourceVersionCache.contains(lo.Revision) | ||
| if isMaybeStale { |
Contributor
There was a problem hiding this comment.
I don't get how we can "maybe" return an error message, but can live with this for now.
Contributor
Author
|
Just to be clear this isn't ready for review I'm still very much in development. The current state has both the first attempt at solving this and another attempt. Appreciate the reviews anyway though. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue rancher/rancher#40773
Might want to add a workqueue in there or anything really to avoid blocking the reflector.