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

sql: No way to get insight into VALIDATE CONSTRAINT progress #26639

Open
jseldess opened this issue Jun 12, 2018 · 11 comments
Open

sql: No way to get insight into VALIDATE CONSTRAINT progress #26639

jseldess opened this issue Jun 12, 2018 · 11 comments
Labels
A-schema-changes C-wishlist A wishlist feature. S-3-ux-surprise Issue leaves users wondering whether CRDB is behaving properly. Likely to hurt reputation/adoption. T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions)

Comments

@jseldess
Copy link
Contributor

jseldess commented Jun 12, 2018

After running alter table vehicles validate constraint fk_owner_id_ref_users;, I assumed it should be possible to track the execution status, but neither SHOW CLUSTER QUERIES nor SHOW JOBS represented it.

I think there should be a way to get insight into this via the CLI or Admin UI.

cc: @knz

Jira issue: CRDB-4992

@knz knz added C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) S-3-ux-surprise Issue leaves users wondering whether CRDB is behaving properly. Likely to hurt reputation/adoption. A-bulkio-schema-changes labels Jun 13, 2018
@knz
Copy link
Contributor

knz commented Jun 13, 2018

cc @dt @mjibson for triage and prioritization

@knz
Copy link
Contributor

knz commented Jul 13, 2018

Issue encountered on gitter by @lkarlslund today

@nstewart
Copy link
Contributor

nstewart commented Dec 8, 2018

If validate wait times scale with database sizes, this UX problem is going to come up more frequently as we market scalability. I've been waiting for several minutes for my current ALTER and it's not clear if I should kill the job or wait longer.

@vivekmenezes is there a workaround for determining if this is slow or just stuck?

cc @awoods187

@vivekmenezes
Copy link
Contributor

@nstewart are you testing with the latest alpha/2.1.2? The reason I ask is because we have a bug #32118 which I feel is fixed through a fix I merge last week.

@tim-o
Copy link
Contributor

tim-o commented Dec 13, 2018

Hey @vivekmenezes - this is coming up again and a customer is asking how to determine whether or not validation is progressing. Is there a method available?

@nstewart
Copy link
Contributor

nstewart commented Dec 20, 2018

On the latest alpha v2.2.0-alpha.20181217 I see:

pq: root: memory budget exceeded: 8935128 bytes requested, 128348184 currently allocated, 134217728 bytes in budget
pq: root: memory budget exceeded: 8935128 bytes requested, 128348184 currently allocated, 134217728 bytes in budget

And there is still no job that says what's happening.

To reproduce, just follow the steps to load the 1M movr dataset here: https://github.com/cockroachdb/movr

@vivekmenezes
Copy link
Contributor

Thanks Nate! Fortunately @lucy-zhang has been able to reproduce the problem with it hanging. She's investigating the issue. Once she's done with fixing it she can run the steps here and double check that they work.

We don't necessarily need a job for this since the query execution is happening as part of the validation (just like any distsql query), the problem here really is the query hanging.

@tim-o
Copy link
Contributor

tim-o commented Mar 15, 2019

Zendesk ticket #3020 has been linked to this issue.

@thoszhang
Copy link
Contributor

Quick update: Some of the performance issues related to VALIDATE CONSTRAINT alluded to above have been fixed, but the fact remains that currently there's no good way to give progress updates on VALIDATE since we're just running a select query to find invalid rows. We'd need some way to get query progress. So this is on hold for the foreseeable future.

@jordanlewis jordanlewis added C-wishlist A wishlist feature. and removed C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) labels Apr 30, 2020
@dt
Copy link
Member

dt commented May 4, 2020

btw: #42518

@shermanCRL
Copy link
Contributor

A note that a client recently would have benefited from this (meaningful progress during schema validation). Conversation in Slack, you can ping me if interested.

@exalate-issue-sync exalate-issue-sync bot added T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) and removed T-sql-schema-deprecated Use T-sql-foundations instead labels May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-schema-changes C-wishlist A wishlist feature. S-3-ux-surprise Issue leaves users wondering whether CRDB is behaving properly. Likely to hurt reputation/adoption. T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions)
Projects
None yet
Development

No branches or pull requests