Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Secondary Indexs / Materialized Views maybe be built in the background - please provide some indication of that #1257

Closed
slivne opened this issue Jan 26, 2021 · 6 comments · Fixed by #1299
Assignees
Labels
enhancement New feature or request

Comments

@slivne
Copy link

slivne commented Jan 26, 2021

There maybe metrics reflecting that as well - @psarna / @nyh - do we have any info of backgroundbuilding of MV/SI and how far are we from completion ?

We have an internal system table providing the status

cassandra@cqlsh:ks> select * from system_distributed.view_build_status ;

 keyspace_name | view_name          | host_id                              | status
---------------+--------------------+--------------------------------------+---------
            ks | testme_v_idx_index | 5bc2500d-9d2c-4edb-97fd-8ba05e55f445 | SUCCESS

In my view - we only need an indication this is being done in the background

@slivne slivne added the enhancement New feature or request label Jan 26, 2021
@amnonh
Copy link
Collaborator

amnonh commented Jan 26, 2021

relates to #1227

@amnonh
Copy link
Collaborator

amnonh commented Feb 4, 2021

@nyh @psarna do we have such metrics?

@psarna
Copy link

psarna commented Feb 4, 2021

void view_builder::setup_metrics() {
    namespace sm = seastar::metrics;

    _metrics.add_group("view_builder", {
        sm::make_gauge("pending_bookkeeping_ops",
                sm::description("Number of tasks waiting to perform bookkeeping operations"),
                [this] { return _sem.waiters(); }),

        sm::make_derive("steps_performed",
                sm::description("Number of performed build steps."),
                _stats.steps_performed),

        sm::make_derive("steps_failed",
                sm::description("Number of failed build steps."),
                _stats.steps_failed),

        sm::make_gauge("builds_in_progress",
                sm::description("Number of currently active view builds."),
                [this] { return _base_to_build_step.size(); })
    });
}

builds_in_progress will indicate if there are active background processes, from steps_performed you can estimate how fast the process is going (or if it's stuck for some reason), and steps_failed will indicate if the process generally succeeds or fails.

@amnonh
Copy link
Collaborator

amnonh commented Feb 4, 2021

@psarna what scylla versions (os/enterprise) this metrics are available?

@psarna
Copy link

psarna commented Feb 4, 2021

OS 4.3

@amnonh
Copy link
Collaborator

amnonh commented Feb 7, 2021

@slivne I'm assigning it to you for the decision, is annotations are applicable

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants