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

storage/engine: centralize specification of pebble.Options #41901

Merged
merged 2 commits into from
Oct 29, 2019

Conversation

petermattis
Copy link
Collaborator

Fixes #41860

Release note: None

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@petermattis
Copy link
Collaborator Author

Only look at the last commit. The first 2 commits are from #41839.

@petermattis petermattis force-pushed the pmattis/pebble-options branch 5 times, most recently from 2cee9d7 to 7997e40 Compare October 29, 2019 12:57
Copy link
Collaborator Author

@petermattis petermattis left a comment

Choose a reason for hiding this comment

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

Ping. This is a straightforward PR.

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

Copy link
Collaborator

@sumeerbhola sumeerbhola 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 @ajkr, @itsbilal, @petermattis, and @sumeerbhola)


pkg/server/config.go, line 514 at r1 (raw file):

							BlockSize: 32 << 10,
						}},
					},

there are multiple configuration values we pass to RocksDB but not to Pebble -- ignoring the ExtraOptions and FileRegistry which are encryption related I see sizeInBytes, spec.Attributes, cfs.Settings. Why the difference?

Copy link
Collaborator Author

@petermattis petermattis 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 @ajkr, @itsbilal, and @sumeerbhola)


pkg/server/config.go, line 514 at r1 (raw file):

Previously, sumeerbhola wrote…

there are multiple configuration values we pass to RocksDB but not to Pebble -- ignoring the ExtraOptions and FileRegistry which are encryption related I see sizeInBytes, spec.Attributes, cfs.Settings. Why the difference?

ExtraOptions are encryption-at-rest options which you'll be implementing shortly. We do pass spec.Attributes and Settings (the latest commit is passing them in engine.StorageConfig. I'm not sure about sizeInBytes. Let me investigate.

Copy link
Collaborator Author

@petermattis petermattis 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 @ajkr, @itsbilal, and @sumeerbhola)


pkg/server/config.go, line 514 at r1 (raw file):

Previously, petermattis (Peter Mattis) wrote…

ExtraOptions are encryption-at-rest options which you'll be implementing shortly. We do pass spec.Attributes and Settings (the latest commit is passing them in engine.StorageConfig. I'm not sure about sizeInBytes. Let me investigate.

sizeInBytes seems to be an oversight. I've added another commit which plumbs it through, as well as does as small bit of cleanup for StorageConfig. PTAL.

Copy link
Collaborator

@sumeerbhola sumeerbhola 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 @ajkr, @itsbilal, @petermattis, and @sumeerbhola)


pkg/storage/engine/pebble.go, line 409 at r3 (raw file):

func (p *Pebble) Capacity() (roachpb.StoreCapacity, error) {
	// Pebble doesn't have a capacity limiting parameter, so pass 0 for
	// maxSizeBytes to denote no limit.

comment is stale

Copy link
Collaborator Author

@petermattis petermattis 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 @ajkr, @itsbilal, and @sumeerbhola)


pkg/storage/engine/pebble.go, line 409 at r3 (raw file):

Previously, sumeerbhola wrote…

comment is stale

Thanks. Fixed.

Move `RocksDBConfig.MaxSizeBytes` to `StorageConfig.MaxSize` so it can
be shared with Pebble.

Embeded `StorageConfig` in both `RocksDBConfig` and `PebbleConfig` so
simplify access to its fields.

Release note: None
@petermattis
Copy link
Collaborator Author

TFTR!

bors r+

craig bot pushed a commit that referenced this pull request Oct 29, 2019
41901: storage/engine: centralize specification of pebble.Options r=petermattis a=petermattis

Fixes #41860

Release note: None

41993: build: Upgrade to go 1.12.12 r=bobvawter a=bobvawter

This change upgrades the go runtime to 1.12.12 in order to pick up a [security
fix](golang/go#34960).

Per the [checklist](build/README.md):
* [X] Adjust version in Docker image
* [X] Rebuild the Docker image and bump the version in builder.sh accordingly
* [ ] ~Bump the version in go-version-check.sh~ (Patch release, not necessary)
* [X] Bump the default installed version of Go in bootstrap-debian.sh

Fixes: #41718

Release note (build change): The go runtime has been upgraded to 1.12.12.

Co-authored-by: Peter Mattis <[email protected]>
Co-authored-by: Bob Vawter <[email protected]>
@craig
Copy link
Contributor

craig bot commented Oct 29, 2019

Build succeeded

@craig craig bot merged commit 25b8acf into cockroachdb:master Oct 29, 2019
@petermattis petermattis deleted the pmattis/pebble-options branch October 29, 2019 17:08
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.

storage/engine: centralize specification of pebble.Options
3 participants