ScyllaDB: Materialized View not updating

Viewed 105

This might be related to this issue: ScyllaDB 2.1 - Inconsistency with Materialized View

But that was 2 years ago, I would have expected this to be fixed, as the docs say that MVs are updated based on the base table.

nodetool version reports ReleaseVersion: 3.0.8

My specific issue, given the table:

CREATE TABLE query (
    activity_id uuid,
    org_id text,
    subject_id uuid,
    result text,
    expires timestamp,
    PRIMARY KEY ((org_id, activity_id), expires)
);

and the MV:

CREATE MATERIALIZED VIEW janus.active_queries AS
    SELECT * FROM janus.query
    WHERE subject_id IS NOT NULL
        and org_id IS NOT NULL
        and activity_id IS NOT NULL
        and expires > toTimestamp(now())
    PRIMARY KEY ((org_id, subject_id), expires, activity_id);

The MV is never updated. Dropping the MV and rebuilding it will give the the correct results for the base-table at the time of creation, but no updates to the MV occur. I would expect records to fall out over time based on the relation "expires > toTimestamp(now())"

Am I mis-understanding how to use the MV? Do these kind of relations not work? Or is my version too old?

0 Answers
Related