cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alain RODRIGUEZ <arodr...@gmail.com>
Subject Re: Mview in cassandra
Date Wed, 17 Oct 2018 10:13:01 GMT
Hello,

The error might be related to your specific clusters (sstableloader / 1
node), I imagine connectivity might be wrong or the data not be loaded
properly for some reason. The data has to be available (nodes up - and
maybe 'nodetool refresh'/'cassandra restart' after the sstableloader things)
and able to connect to each other.

I tried to drop the Materialized View and recreate it , but the data is not
> getting populated with version 3.11.1
>

What error do you have then, when recreating (if any)?
Are normal reads working? And when using a consistency of 'all'?

I was overall willing to share this information that might matter to you
about MVs:
The recommendation around Materialized view at the moment is as follow:
"Do not use them unless you know exactly how they (don't) work."

http://mail-archives.apache.org/mod_mbox/cassandra-user/201710.mbox/%3CetPan.59f24f38.438f4e99.74dc@apple.com%3E

According to Blake (but I think there is a large consensus on this opinion):

Concerns about MV’s suitability for production are not uncommon, and this
> just formalizes
> the advice often given to people considering materialized views. That is:
> materialized views
> have shortcomings that can make them unsuitable for the general use case.
> If you’re not
> familiar with their shortcomings and confident they won’t cause problems
> for your use case,
> you shouldn’t use them



The shortcomings I’m referring to are:
> * There's no way to determine if a view is out of sync with the base table.
> * If you do determine that a view is out of sync, the only way to fix it
> is to drop and rebuild
> the view.
> Even in the happy path, there isn’t an upper bound on how long it will
> take for updates
> to be reflected in the view.


It was even shared that the feature is complex and that we (community, but
I *think* also committers and developers) don't have a complete
understanding of this feature.
You might want to consider to look for a workaround not involving MVs.
Also, version C*3.11.2 do not seem to have any improvement regarding MV
compared to C*3.11.1, it was just marked as experimental it seems. Thus
upgrading will not help probably.

I imagine it's not what you wanted to hear, but I would really not stick
with MVs at the moment. If this cluster would be under my responsibility I
would probably consider redesign the schema.

C*heers,
-----------------------
Alain Rodriguez - alain@thelastpickle.com
France / Spain

The Last Pickle - Apache Cassandra Consulting
http://www.thelastpickle.com



Le mar. 16 oct. 2018 à 18:25, rajasekhar kommineni <rajacoast@gmail.com> a
écrit :

> Hi,
>
> I am seeing below warning message in system.log after datacopy using
> sstabloader.
>
> WARN  [CompactionExecutor:972] 2018-10-15 22:20:39,308
> ViewBuilder.java:189 - Materialized View failed to complete, sleeping 5
> minutes before restarting
> org.apache.cassandra.exceptions.UnavailableException: Cannot achieve
> consistency level ONE
>
> I tried to drop the Materialized View and recreate it , but the data is
> not getting populated with version 3.11.1
>
> I tried the same on version 3.11.2 on single node dev box and I can query
> the Materialized View with data. Any body have some experiences with
> Mview’s.
>
> Thanks,
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@cassandra.apache.org
> For additional commands, e-mail: user-help@cassandra.apache.org
>
>

Mime
View raw message