Skip to content

roachtest: fix multitenant-upgrade#71604

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
tbg:fix-multiten-upgrade
Oct 19, 2021
Merged

roachtest: fix multitenant-upgrade#71604
craig[bot] merged 1 commit intocockroachdb:masterfrom
tbg:fix-multiten-upgrade

Conversation

@tbg
Copy link
Copy Markdown
Member

@tbg tbg commented Oct 15, 2021

In #71040 we added disk spilling for tenants which added the following
call to the mt start-sql code path:

https://github.com/cockroachdb/cockroach/blob/af5a5a5065ce80c5e6568b4b422bf5c3a179e173/pkg/cli/mt_start_sql.go#L90-L89

The defaults for the store match that of a regular CockroachDB node, and
the tenant will thus attempt to clean up temp dirs for cockroach-data
if no store is specified:

cockroach/pkg/cli/start.go

Lines 223 to 227 in 6999e5f

recordPath := filepath.Join(spec.Path, server.TempDirsRecordFilename)
if err := storage.CleanupTempDirs(recordPath); err != nil {
return base.TempStorageConfig{}, errors.Wrap(err,
"could not cleanup temporary directories from record file")
}

In the multitenant-upgrade roachtest, as it happens there was actually
a cockroach host instance running under cockroach-data, and so the
tenant would fail to try to remove its (locked) temp dirs.

Fix that by passing the --store flag to the tenants in this test. This
is mildly annoying since the predecessor version doesn't understand it
and so the test has to figure out when it is legal to pass it. Anyway,
it is done now.

I will point out that it isn't the greatest choice to have tenants
default to cockroach-data as the resulting interaction with a CRDB
server results in an unfortunate UX. I filed #71603 to that effect.

Closes #69920

Release note: None

In cockroachdb#71040 we added disk spilling for tenants which added the following
call to the `mt start-sql` code path:

https://github.com/cockroachdb/cockroach/blob/af5a5a5065ce80c5e6568b4b422bf5c3a179e173/pkg/cli/mt_start_sql.go#L90-L89

The defaults for the store match that of a regular CockroachDB node, and
the tenant will thus attempt to clean up temp dirs for `cockroach-data`
if no store is specified:

https://github.com/cockroachdb/cockroach/blob/6999e5fded43f59eb5839dc8b943fd1e2a33a3fd/pkg/cli/start.go#L223-L227

In the `multitenant-upgrade` roachtest, as it happens there was actually
a cockroach host instance running under `cockroach-data`, and so the
tenant would fail to try to remove its (locked) temp dirs.

Fix that by passing the `--store` flag to the tenants in this test. This
is mildly annoying since the predecessor version doesn't understand it
and so the test has to figure out when it is legal to pass it. Anyway,
it is done now.

I will point out that it isn't the greatest choice to have tenants
default to `cockroach-data` as the resulting interaction with a CRDB
server results in an unfortunate UX. I filed cockroachdb#71603 to that effect.

Release note: None
@tbg tbg requested a review from jaylim-crl October 15, 2021 09:11
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Copy link
Copy Markdown
Contributor

@jaylim-crl jaylim-crl left a comment

Choose a reason for hiding this comment

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

:lgtm: Thanks for the quick fix!

Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @tbg)

@tbg
Copy link
Copy Markdown
Member Author

tbg commented Oct 19, 2021

bors r=jaylim-crl

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Oct 19, 2021

Build succeeded:

@craig craig bot merged commit 319256c into cockroachdb:master Oct 19, 2021
@tbg
Copy link
Copy Markdown
Member Author

tbg commented Oct 19, 2021

blathers backport 21.2

@blathers-crl
Copy link
Copy Markdown

blathers-crl bot commented Oct 19, 2021

Encountered an error creating backports. Some common things that can go wrong:

  1. The backport branch might have already existed.
  2. There was a merge conflict.
  3. The backport branch contained merge commits.

You might need to create your backport manually using the backport tool.


error creating backport branch refs/heads/blathers/backport-release-21.2-71604: POST https://api.github.com/repos/cockroachdb/cockroach/git/refs: 422 Reference already exists []

Backport to branch 21.2 failed. See errors above.


🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan.

@tbg tbg deleted the fix-multiten-upgrade branch October 19, 2021 10:31
AlexTalks added a commit to AlexTalks/cockroach that referenced this pull request Nov 25, 2021
Previously, the `multitenant-upgrade` test had several workarounds and
branches for dealing with predecessor versions less than v21.2,
particularly the fact that these versions did not support the `--store`
flag passed on the `mt start-sql` CLI command.  This was introduced
in cockroachdb#71040, and subsequently incorporated into the roachtest (including
workarounds) in cockroachdb#71604.  Now that the current version is v22.1, and thus
the predecessor version supports the `--store` flag, it is necessary to
remove the workaround in order to ensure proper functionality of the
test.  Additionally, this change cleans up an even earlier workaround
for validating the cluster version for predecessor versions less than
v21.1.2.

Fixes cockroachdb#72971.

Release note: None
craig bot pushed a commit that referenced this pull request Nov 29, 2021
72948: ui: add index stats to table details page r=lindseyjin a=lindseyjin

Resolves #67647, #72842

Previously, there was no way to view and clear index usage stats from
the frontend db console. This commit adds Index Stats tables for each
table on the Table Detail pages, allowing users to view index names,
total reads, and last used statistics. This commit also adds the
functionality of clearing all index stats as a button on the Index Stats
tables.

![image](https://user-images.githubusercontent.com/29153209/142700094-cad60f81-8c83-48cc-b1f4-970e80d951ee.png)

Release note (ui change): Add index stats table and button to clear
index usage stats on the Table Details page for each table.

73145: roachtest: fix flags used in multitenant-upgrade for versions >= v21.2 r=AlexTalks a=AlexTalks

Previously, the `multitenant-upgrade` test had several workarounds and
branches for dealing with predecessor versions less than v21.2,
particularly the fact that these versions did not support the `--store`
flag passed on the `mt start-sql` CLI command.  This was introduced
in #71040, and subsequently incorporated into the roachtest (including
workarounds) in #71604.  Now that the current version is v22.1, and thus
the predecessor version supports the `--store` flag, it is necessary to
remove the workaround in order to ensure proper functionality of the
test.  Additionally, this change cleans up an even earlier workaround
for validating the cluster version for predecessor versions less than
v21.1.2.

Fixes #72971.

Release note: None

Co-authored-by: Lindsey Jin <lindsey.jin@cockroachlabs.com>
Co-authored-by: Alex Sarkesian <sarkesian@cockroachlabs.com>
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.

roachtest: multitenant-upgrade failed

3 participants