Skip to content

db: support store-relative paths for WAL dirs #4755

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

Merged
merged 3 commits into from
May 27, 2025

Conversation

RaduBerinde
Copy link
Member

@RaduBerinde RaduBerinde commented May 21, 2025

db: support store-relative paths for WAL dirs

Relative WAL paths (including the actual WAL, the failover path, and
the recovery paths) are (unfortunately) interpreted as relative to the
current working directory.

The cross-version metamorphic test copies a store from a previous run
as the initial state for a new test. The options will fail the
compatibility check since the path changes.

This change adds support for using a special {store_path} prefix to
the path. Any such prefix is replaced with the store directory.

We also improve the missing WAL recovery dir error to show what
directories are actually configured.

metamorphic: use store-relative paths

metamorphic: fix code around WAL recovery directories

Informs: #4732

@RaduBerinde RaduBerinde requested a review from a team as a code owner May 21, 2025 18:30
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@RaduBerinde RaduBerinde force-pushed the wal-relative-store-paths branch 5 times, most recently from 1acfb4b to edb208b Compare May 22, 2025 01:34
Relative WAL paths (including the actual WAL, the failover path, and
the recovery paths) are (unfortunately) interpreted as relative to the
current working directory.

The cross-version metamorphic test copies a store from a previous run
as the initial state for a new test. The options will fail the
compatibility check since the path changes.

This change adds support for using a special `{store_path}` prefix
inside the path. Any such prefix is replaced with the store directory.

We also improve the missing WAL recovery dir error to show what
directories are actually configured.
@RaduBerinde RaduBerinde force-pushed the wal-relative-store-paths branch from edb208b to da841ab Compare May 22, 2025 18:45
@RaduBerinde
Copy link
Member Author

Added a commit that updates and fixes the code that sets up the WAL recovery dirs.

Copy link
Collaborator

@jbowens jbowens left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 5 of 5 files at r1, 2 of 2 files at r2, 3 of 3 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @sumeerbhola)

@RaduBerinde
Copy link
Member Author

TFTR!

@RaduBerinde RaduBerinde merged commit 1b64b32 into cockroachdb:master May 27, 2025
5 of 6 checks passed
@RaduBerinde RaduBerinde deleted the wal-relative-store-paths branch May 27, 2025 14:34
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