-
Notifications
You must be signed in to change notification settings - Fork 4k
storage, fs: move pebble cluster version compat check to InitEnv #151935
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
Conversation
deb890e
to
662d064
Compare
6dc486f
to
b64a3d4
Compare
14683fd
to
d5e8f96
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(still reading; flushing comments on first commit)
Reviewed 10 of 10 files at r1, 1 of 19 files at r2.
Reviewable status:complete! 0 of 0 LGTMs obtained (waiting on @annrpom)
pkg/storage/minversion/min_version.go
line 26 at r1 (raw file):
// MinVersionIsAtLeastTargetVersion returns whether the min version recorded // on disk is at least the target version. func MinVersionIsAtLeastTargetVersion(
nit: This is moot if we end up moving this into storage/fs
, but if these are in a minversion
package I think we should strip the MinVersion
prefix from these names to avoid the stutter.
pkg/storage/min_version.go
line 37 at r1 (raw file):
} filename := atomicRenameFS.PathJoin(dir, minversion.MinVersionFilename) if err := fs.SafeWriteToUnencryptedFile(atomicRenameFS, dir, filename, b, fs.UnspecifiedWriteCategory); err != nil {
Maybe we should move the min version stuff into the fs
package itself? it seems like the func to write the min version file (writeMinVersionFile
) should be in the minversion
package, but that's not possible because of the cycle that motivated this move right?
d5e8f96
to
c2d3f7b
Compare
Move functions to perform pebble compatibility checks into the fs pkg.
c2d3f7b
to
3f06293
Compare
Previously, we performed the CRDB version compatibility check for pebble and the currently running cluster in the pebble constructor. This commit moves that check to the file system environment initialization so that we can colocate with fs encyrption initialization. We also extend the version checking to validate that pebble's minversion is not too high for the current cockroach version, to guard against backwards incompatible changes. Fixes: cockroachdb#148213 Epic: none Release note: None
3f06293
to
ab81bf1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice
@jbowens reviewed 25 of 25 files at r4, 8 of 22 files at r5, 2 of 22 files at r6, 15 of 19 files at r7, 6 of 6 files at r8, all commit messages.
Reviewable status:complete! 1 of 0 LGTMs obtained (waiting on @annrpom)
tftr! |
storage: move store version checks into fs pkg
Move functions to perform pebble compatibility checks into the fs pkg.
storage: add cluster version to env config
storage, fs: move pebble cluster version compat check to InitEnv
Previously, we performed the CRDB version compatibility check for pebble and the
currently running cluster in the pebble constructor. This commit moves that
check to the file system environment initialization so that we can colocate
with fs encyrption initialization.
We also extend the version checking to validate that pebble's minversion is not
too high for the current cockroach version, to guard against backwards
incompatible changes.
Fixes: #148213
Epic: none
Release note: None