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

cli: add --experimental-secondary-cache flag #111143

Merged
merged 1 commit into from
Sep 28, 2023

Conversation

itsbilal
Copy link
Member

This change adds a new --experimental-secondary-cache flag for use with --experimental-shared-storage to enable the use of a secondary cache to speed up reads of objects in shared storage. This option sets the max cache size for each store using disaggregated storage; for per-store granularity, pebble options can also be used.

Epic: none

Release note: None

@itsbilal itsbilal requested a review from joshimhoff September 22, 2023 21:48
@itsbilal itsbilal requested review from a team as code owners September 22, 2023 21:48
@itsbilal itsbilal requested a review from jbowens September 22, 2023 21:48
@blathers-crl
Copy link

blathers-crl bot commented Sep 22, 2023

It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR?

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

@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Member

@RaduBerinde RaduBerinde left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @itsbilal, @jbowens, and @joshimhoff)


pkg/cli/flags.go line 492 at r1 (raw file):

			cliflagcfg.VarFlag(f, &serverCfg.StorageEngine, cliflags.StorageEngine)
			cliflagcfg.StringFlag(f, &serverCfg.SharedStorage, cliflags.SharedStorage)
			cliflagcfg.IntFlag(f, &serverCfg.SecondaryCache, cliflags.SecondaryCache)

Flag is documented as accepting GiB, I don't think that's true with IntFlag?

Copy link
Member Author

@itsbilal itsbilal left a comment

Choose a reason for hiding this comment

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

TFTR!

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @jbowens, @joshimhoff, and @RaduBerinde)


pkg/cli/flags.go line 492 at r1 (raw file):

Previously, RaduBerinde wrote…

Flag is documented as accepting GiB, I don't think that's true with IntFlag?

Good catch. Now it supports GiB.

Copy link
Member

@RaduBerinde RaduBerinde left a comment

Choose a reason for hiding this comment

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

:lgtm: with one nit

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @itsbilal, @jbowens, and @joshimhoff)


pkg/cli/cliflags/flags.go line 1045 at r2 (raw file):

  --experimental-secondary-cache=20GB            -> 20000000000 bytes
  --experimental-secondary-cache=20GiB           -> 21474836480 bytes
  --experimental-secondary-cache=0.02TiB         -> 21474836480 bytes

[nit] This value is not correct, it's more like 21990232555 bytes. I'd just remove the example.

This change adds a new `--experimental-secondary-cache`
flag for use with `--experimental-shared-storage` to enable
the use of a secondary cache to speed up reads of objects
in shared storage. This option sets the max cache size for
each store using disaggregated storage; for per-store
granularity, pebble options can also be used.

Epic: none

Release note: None
Copy link
Member Author

@itsbilal itsbilal left a comment

Choose a reason for hiding this comment

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

TFTR!

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @jbowens, @joshimhoff, and @RaduBerinde)


pkg/cli/cliflags/flags.go line 1045 at r2 (raw file):

Previously, RaduBerinde wrote…

[nit] This value is not correct, it's more like 21990232555 bytes. I'd just remove the example.

Done.

@itsbilal
Copy link
Member Author

bors r=RaduBerinde

@craig
Copy link
Contributor

craig bot commented Sep 28, 2023

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Sep 28, 2023

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Sep 28, 2023

Build failed (retrying...):

@craig craig bot merged commit 39614e9 into cockroachdb:master Sep 28, 2023
@craig
Copy link
Contributor

craig bot commented Sep 28, 2023

Build succeeded:

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