Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sleep after namespace registration to refresh cache #101

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rodrigozhou
Copy link
Collaborator

What was changed

Added sleep 10 to wait for namespace cache to refresh.

Why?

Sleeping 10 seconds is the only safe way to ensure all namespace caches are refreshed.

Checklist

  1. Closes

  2. How was this tested:

  1. Any docs updates needed?

@rodrigozhou rodrigozhou requested a review from a team as a code owner February 10, 2023 17:48
Comment on lines +292 to +293
echo "Waiting for namespace cache to refresh (sleeping for 10 seconds)..."
sleep 10

Choose a reason for hiding this comment

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

@pdoerner This seems related to the work you were doing for sync namespace registration. Any way we can get around using a sleep here?

Copy link
Member

Choose a reason for hiding this comment

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

Namespace cache should already support read through if namespace is not found.
I think the problem is there's no read through if search attribute within the namespace config is not found. Then this sleep should happen after search attributes are added?

An easy fix would be allow specifying search attributes when registering namespace.

@MichaelSnowden MichaelSnowden self-assigned this Apr 26, 2023
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