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

feat(admin): speed up fetching cluster metadata #480

Merged
merged 1 commit into from
Jul 28, 2023
Merged

Commits on Jul 28, 2023

  1. feat(admin): speed up fetching cluster metadata

    This PR improves `internal/admin/mrmanager.(*mrManager).ClusterMetadata` performance:
    
    - Fail-fast: If the given context is canceled, it returns a context error without acquiring the
      mutex.
    - Fast-path: If the cluster metadata does not need to update, it returns the existing thing without
      the exclusive lock.
    - Slow-path: It is similar to the previous implementation but shares the updated cluster metadata
      using a singleflight.
    
    This PR makes the `internal/admin/mrmanager.(*mrManager).ClusterMetadata` more concurrent and
    removes unnecessary RPCs. It also avoids RPC calls within exclusive mutex.
    ijsong committed Jul 28, 2023
    Configuration menu
    Copy the full SHA
    3e46f62 View commit details
    Browse the repository at this point in the history