[jira] [Commented] (CASSANDRA-9967) Determine if a Materialized View is finished building, without having to query each node
[ https://issues.apache.org/jira/browse/CASSANDRA-9967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15684901#comment-15684901 ] Simon Zhou commented on CASSANDRA-9967: --- [~carlyeks] Is it possible to backport this patch to 3.0? Thanks. > Determine if a Materialized View is finished building, without having to > query each node > > > Key: CASSANDRA-9967 > URL: https://issues.apache.org/jira/browse/CASSANDRA-9967 > Project: Cassandra > Issue Type: New Feature > Components: Coordination, Observability >Reporter: Alan Boudreault >Assignee: Carl Yeksigian >Priority: Minor > Labels: lhf > Fix For: 3.6 > > > Since MVs are eventually consistent with its base table, It would nice if we > could easily know the state of the MV after its creation, so we could wait > until the MV is built before doing some operations. > // cc [~mbroecheler] [~tjake] [~carlyeks] [~enigmacurry] -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-9967) Determine if a Materialized View is finished building, without having to query each node
[ https://issues.apache.org/jira/browse/CASSANDRA-9967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15220596#comment-15220596 ] Joel Knighton commented on CASSANDRA-9967: -- CI looks clean relative to upstream. Changes look good. +1 - this needs a squash and rebase; feel free to set to "Ready to Commit" after that. > Determine if a Materialized View is finished building, without having to > query each node > > > Key: CASSANDRA-9967 > URL: https://issues.apache.org/jira/browse/CASSANDRA-9967 > Project: Cassandra > Issue Type: New Feature >Reporter: Alan Boudreault >Assignee: Carl Yeksigian >Priority: Minor > Labels: lhf > Fix For: 3.x > > > Since MVs are eventually consistent with its base table, It would nice if we > could easily know the state of the MV after its creation, so we could wait > until the MV is built before doing some operations. > // cc [~mbroecheler] [~tjake] [~carlyeks] [~enigmacurry] -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-9967) Determine if a Materialized View is finished building, without having to query each node
[ https://issues.apache.org/jira/browse/CASSANDRA-9967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15207134#comment-15207134 ] Carl Yeksigian commented on CASSANDRA-9967: --- I just pushed an update to address Joel's comments and CI is rerunning now. > Determine if a Materialized View is finished building, without having to > query each node > > > Key: CASSANDRA-9967 > URL: https://issues.apache.org/jira/browse/CASSANDRA-9967 > Project: Cassandra > Issue Type: New Feature >Reporter: Alan Boudreault >Assignee: Carl Yeksigian >Priority: Minor > Labels: lhf > Fix For: 3.x > > > Since MVs are eventually consistent with its base table, It would nice if we > could easily know the state of the MV after its creation, so we could wait > until the MV is built before doing some operations. > // cc [~mbroecheler] [~tjake] [~carlyeks] [~enigmacurry] -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-9967) Determine if a Materialized View is finished building, without having to query each node
[ https://issues.apache.org/jira/browse/CASSANDRA-9967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15206497#comment-15206497 ] Carl Yeksigian commented on CASSANDRA-9967: --- I haven't gotten back to this yet, but I will in the next couple of days. > Determine if a Materialized View is finished building, without having to > query each node > > > Key: CASSANDRA-9967 > URL: https://issues.apache.org/jira/browse/CASSANDRA-9967 > Project: Cassandra > Issue Type: New Feature >Reporter: Alan Boudreault >Assignee: Carl Yeksigian >Priority: Minor > Labels: lhf > Fix For: 3.x > > > Since MVs are eventually consistent with its base table, It would nice if we > could easily know the state of the MV after its creation, so we could wait > until the MV is built before doing some operations. > // cc [~mbroecheler] [~tjake] [~carlyeks] [~enigmacurry] -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-9967) Determine if a Materialized View is finished building, without having to query each node
[ https://issues.apache.org/jira/browse/CASSANDRA-9967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15204795#comment-15204795 ] Jonathan Ellis commented on CASSANDRA-9967: --- Carl, how is this looking? > Determine if a Materialized View is finished building, without having to > query each node > > > Key: CASSANDRA-9967 > URL: https://issues.apache.org/jira/browse/CASSANDRA-9967 > Project: Cassandra > Issue Type: New Feature >Reporter: Alan Boudreault >Assignee: Carl Yeksigian >Priority: Minor > Labels: lhf > Fix For: 3.x > > > Since MVs are eventually consistent with its base table, It would nice if we > could easily know the state of the MV after its creation, so we could wait > until the MV is built before doing some operations. > // cc [~mbroecheler] [~tjake] [~carlyeks] [~enigmacurry] -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-9967) Determine if a Materialized View is finished building, without having to query each node
[ https://issues.apache.org/jira/browse/CASSANDRA-9967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15196309#comment-15196309 ] Jeremiah Jordan commented on CASSANDRA-9967: AFAIK the goal of executeInternal is supposed to only execute on the current node and not be a distributed query. > Determine if a Materialized View is finished building, without having to > query each node > > > Key: CASSANDRA-9967 > URL: https://issues.apache.org/jira/browse/CASSANDRA-9967 > Project: Cassandra > Issue Type: New Feature >Reporter: Alan Boudreault >Assignee: Carl Yeksigian >Priority: Minor > Labels: lhf > Fix For: 3.x > > > Since MVs are eventually consistent with its base table, It would nice if we > could easily know the state of the MV after its creation, so we could wait > until the MV is built before doing some operations. > // cc [~mbroecheler] [~tjake] [~carlyeks] [~enigmacurry] -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-9967) Determine if a Materialized View is finished building, without having to query each node
[ https://issues.apache.org/jira/browse/CASSANDRA-9967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15180504#comment-15180504 ] Joel Knighton commented on CASSANDRA-9967: -- Sorry for the delay. utests and dtests look clean compared to upstream. The added dtests pass locally for me. A dtest that covers calling the command after dropping a view would be nice. In SystemKeyspace - Now might be a good time to fix the comment above {{finishViewBuildStatus}} that we discussed ("the build succeeded, but the view build failed") - Changing {{viewBuiltReplicated}} to {{setViewBuiltReplicated}} better matches the naming convention used elsewhere in the class - The {{forceBlockingFlush}} at end of {{viewBuiltReplicated}} is redundant with the call at the end of {{setViewBuilt}} In QueryProcessor - As we discussed, there's other improvements to be made in QueryProcessor for clarity. It seems to me that the {{executeInternal}} you added might not be appropriately named - it calls {{statement.execute}} rather than {{statement.executeInternal}}. (It's not entirely clear whether the internal in QueryProcessor.executeInternal is to reflect that it uses internal QueryState or executeInternal on PreparedStatement, but it seems to me to indicate the latter.) In StorageService - In {{getViewBuildStatuses}}, retrieving the {{hostIdToEndpoint}} map at a different time than calling {{getEndpointToHostIdMapForReading()}} opens up a race with changes in TokenMetadata that could result in the endpoint being null. It seems to me cleaner to retrieve the endpointToHostIdMapForReading and iterate over its entries rather than maintaining two separate maps. > Determine if a Materialized View is finished building, without having to > query each node > > > Key: CASSANDRA-9967 > URL: https://issues.apache.org/jira/browse/CASSANDRA-9967 > Project: Cassandra > Issue Type: New Feature >Reporter: Alan Boudreault >Assignee: Carl Yeksigian >Priority: Minor > Labels: lhf > Fix For: 3.x > > > Since MVs are eventually consistent with its base table, It would nice if we > could easily know the state of the MV after its creation, so we could wait > until the MV is built before doing some operations. > // cc [~mbroecheler] [~tjake] [~carlyeks] [~enigmacurry] -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-9967) Determine if a Materialized View is finished building, without having to query each node
[ https://issues.apache.org/jira/browse/CASSANDRA-9967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14905074#comment-14905074 ] Carl Yeksigian commented on CASSANDRA-9967: --- A few ideas if someone wants to pick this up: - We should use the {{system_distributed}} keyspace for this, and I think the primary key should be: {{(table_id, host_id)}} - We should retry updating the table if we don't succeed, and make sure that on startup we have captured all of the builds that we have locally in the distributed table - We need to make sure that we handle node membership properly - We should make sure that we set the exit code if the view isn't built yet > Determine if a Materialized View is finished building, without having to > query each node > > > Key: CASSANDRA-9967 > URL: https://issues.apache.org/jira/browse/CASSANDRA-9967 > Project: Cassandra > Issue Type: New Feature >Reporter: Alan Boudreault >Priority: Minor > Labels: lhf > Fix For: 3.x > > > Since MVs are eventually consistent with its base table, It would nice if we > could easily know the state of the MV after its creation, so we could wait > until the MV is built before doing some operations. > // cc [~mbroecheler] [~tjake] [~carlyeks] [~enigmacurry] -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-9967) Determine if a Materialized View is finished building, without having to query each node
[ https://issues.apache.org/jira/browse/CASSANDRA-9967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14661777#comment-14661777 ] Carl Yeksigian commented on CASSANDRA-9967: --- This is stored in the local {{system.built_materialized_views}} table. {noformat} SELECT * FROM system.built_materialized_view WHERE keyspace_name='ks' AND view_name='view' {noformat} Determine if a Materialized View is finished building, without having to query each node Key: CASSANDRA-9967 URL: https://issues.apache.org/jira/browse/CASSANDRA-9967 Project: Cassandra Issue Type: New Feature Reporter: Alan Boudreault Priority: Minor Fix For: 3.x Since MVs are eventually consistent with its base table, It would nice if we could easily know the state of the MV after its creation, so we could wait until the MV is built before doing some operations. // cc [~mbroecheler] [~tjake] [~carlyeks] [~enigmacurry] -- This message was sent by Atlassian JIRA (v6.3.4#6332)