[ 
https://issues.apache.org/jira/browse/CASSANDRA-15845?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17124820#comment-17124820
 ] 

Berenguer Blasi commented on CASSANDRA-15845:
---------------------------------------------

[~jasonstack] you rock! you saved me a few hours of painful debugging :-) I 
have tried to repro locally and I can't anymore. I will leave it running for 
lunch just in case as it was a difficult one to repro. I would like to get your 
opinion on how to best fix this given I don't know the codebase as well:
A. Make {{SchemaKeyspace#calculateSchemaDigest}} public and check schema 
agreement against that as well in {{Gossiper#nodesAgreeOnSchema}} (this is the 
current fix that seems to work
B. Mark the schema somehow 'dirty' and take that into account in all calls to 
the version. Not sure how or how much work that would be
C. Block during the 'schema version update' window.

I think B and C sound very nice but I wonder into how much trouble and 
deadlocks can we get ourselves into and if it's worth it or reasonably doable. 
Maybe fixing {{Gossiper#nodesAgreeOnSchema}} with A is a good compromise and 
that method is going to be there for anybody that needs to. Wdyt? :thinking:

> dtest-novnode.materialized_views_test.TestMaterializedViews.test_populate_mv_after_insert_wide_rows
> ---------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-15845
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-15845
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Test/dtest
>            Reporter: Berenguer Blasi
>            Assignee: Berenguer Blasi
>            Priority: Normal
>             Fix For: 4.0-beta
>
>
> See failure 
> [here|https://ci-cassandra.apache.org/job/Cassandra-trunk/155/testReport/dtest-novnode.materialized_views_test/TestMaterializedViews/test_populate_mv_after_insert_wide_rows_2/]
> {quote}Error Message
> assert 160 == 0  +  where 160 = Row(count=160).count
> Stacktrace
> self = <materialized_views_test.TestMaterializedViews object at 
> 0x7fcb232b5760>
>     def test_populate_mv_after_insert_wide_rows(self):
>         """Test that a view is OK when created with existing data with wide 
> rows"""
>         session = self.prepare(consistency_level=ConsistencyLevel.QUORUM)
>     
>         session.execute("CREATE TABLE t (id int, v int, PRIMARY KEY (id, v))")
>     
>         for i in range(5):
>             for j in range(10000):
>                 session.execute("INSERT INTO t (id, v) VALUES ({}, 
> {})".format(i, j))
>     
>         session.execute(("CREATE MATERIALIZED VIEW t_by_v AS SELECT * FROM t 
> WHERE v IS NOT NULL "
>                          "AND id IS NOT NULL PRIMARY KEY (v, id)"))
>     
>         logger.debug("wait for view to build")
>         self._wait_for_view("ks", "t_by_v")
>     
>         logger.debug("wait that all batchlogs are replayed")
> >       self._replay_batchlogs()
> materialized_views_test.py:350: 
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ 
> self = <materialized_views_test.TestMaterializedViews object at 
> 0x7fcb232b5760>
>     def _replay_batchlogs(self):
>         for node in self.cluster.nodelist():
>             if node.is_running():
>                 logger.debug("Replaying batchlog on node 
> {}".format(node.name))
>                 node.nodetool("replaybatchlog")
>                 # CASSANDRA-13069 - Ensure replayed mutations are removed 
> from the batchlog
>                 node_session = self.patient_exclusive_cql_connection(node)
>                 result = list(node_session.execute("SELECT count(*) FROM 
> system.batches;"))
> >               assert result[0].count == 0
> E               assert 160 == 0
> E                +  where 160 = Row(count=160).count
> materialized_views_test.py:171: AssertionError{quote}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to