Skip to content

Conversation

@tomleb
Copy link
Contributor

@tomleb tomleb commented Sep 11, 2024

Issue rancher/rancher#40773

Might want to add a workqueue in there or anything really to avoid blocking the reflector.

@moio moio changed the base branch from master to main December 17, 2024 11:59
@moio
Copy link
Contributor

moio commented Dec 17, 2024

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: "overridden"

@@ -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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: "a cache" is correct

indexedFields: indexedFields,
resourceVersionCache: newResourceVersionCache(1000),
}
fmt.Println("HITHERE creating list option indexer")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

draft mode :)

// - 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 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't get how we can "maybe" return an error message, but can live with this for now.

@tomleb
Copy link
Contributor Author

tomleb commented Jan 17, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants