Originally from the User Slack
@Thomas_Foubert: Hi everyone, where should I look into for support regarding indexes? One of my users failed at being mature with the usage of the cluster and I can now see MV operations being run non-stop since 2 days. I want to stop that before it eats the whole disk space and/or crashes the whole cluster. I am not really well informed with indexes/MV on Scylla.
This is the query he ran programatically with about 10 different variables as %s
:
CREATE INDEX IF NOT EXISTS idx_status_%s ON "%s" (status);
@Piotr_Smaroń: maybe @Nadav can help
@Nadav: I think, but not in front of the computer, that it’s allowed to DROP INDEX while an index is still building, and it will stop building. But please test this on some side server before unleashing it on your main deployment.
I mean I am not in front of a computer
@Thomas_Foubert: ah big problem is, I don’t have the chance to have a dev DB at my client’s
can I ensure that MV/indexes are actually being created and it’s not some kind of observability discrepancy?
@Nadav: Oh, i thought you said it’s running. Now I see it’s not (disk space not going up in your graph). So what us bothering you, actually? Just that normal writes do a lot of MV work? That’s to be expected if you have many indexes - all of them need to be updated on every write. So what is the problem? If you added indexes by mistake you can drop them.
@Thomas_Foubert: My bad, just read the difference between MV and indexes. So this user also ran commands arbitrarily using CQLSH and after he ran commands MV started to show on my graphs, there weren’t being used before and he claims that he didn’t do anything related to MVs. I’m a bit concerned about what’s happening, the grafana reports that MV are being built is this normal behaviour when creating new indexes?
Running SELECT * FROM system_schema.views;
gives me a list of the indexes he created
@Nadav: Scylla’s indexes are implemented using a materializes view for each index.
@Thomas_Foubert: Perfect, so this is totally expected right?
@Nadav: Yes
@Thomas_Foubert: Thank you for your answers and your time, have a great day!