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

roachprod: avoid syncing all the time #137956

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

golgeek
Copy link
Contributor

@golgeek golgeek commented Dec 23, 2024

A few commands that alter a single cluster were forcing a sync of all clusters across all Cloud providers after execution in order to refresh roachprod's local cache. While this behavior limits the possibility of a cache drift, it can lead to many issues (as describe in #130082).

By updating the Provider{} interface, this patch forces its implementations to return an updated vm.List argument when creating or modifying a cluster. This allows to directly update the local cache without having to sync from the Cloud providers again. As most of the commands executed to alter a cluster already return the information required to update the cache, this also reduces the number of API calls to the Cloud providers.

The following commands have been updated:

  • create
  • destroy
  • extend
  • grow
  • shrink

Epic: none
Release note: None

@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link

blathers-crl bot commented Dec 23, 2024

Your pull request contains more than 1000 changes. It is strongly encouraged to split big PRs into smaller chunks.

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

A few commands that alter a single cluster were forcing a sync of all
clusters across all Cloud providers after execution in order to refresh
`roachprod`'s local cache. While this behavior limits the possibility of
a cache drift, it can lead to many issues (as describe in cockroachdb#130082).

By updating the `Provider{}` interface, this patch forces its
implementations to return an updated `vm.List` argument when creating or
modifying a cluster. This allows to directly update the local cache
without having to sync from the Cloud providers again.
As most of the commands executed to alter a cluster already return the
information required to update the cache, this also reduces the number
of API calls to the Cloud providers.

The following commands have been updated:
  - create
  - destroy
  - extend
  - grow
  - shrink

Epic: none
Release note: None
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.

2 participants