Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Table materialized views does not initialize on initial startup #193

Open
vvaldersteins opened this issue Jan 10, 2019 · 0 comments
Open

Comments

@vvaldersteins
Copy link

vvaldersteins commented Jan 10, 2019

Hi,

So I'm having an issue - I have a API, and it has around 35 tables and same amount of materialized views, so in total around 70. The issue is that all of the tables gets created just fine, and I can see it in cassandra logs, but when it gets to materialzied views, it just creates few of them and then it stops. I have to restart the express application several times for it to continue to create the materialized views, but in the end (after everything is created), I get unconfigured table error when trying to read from the materialized views. It hangs up on different type of materialized views every time. I can read just fine from the standard tables tho.

I have already increased the timeout for each and every node in cassandra.yaml file to 30000 ms and I have set socketOptions readTimeout to 0 in the express-cassandra configuration in app.js.

It looks like this -

cassandra.setDirectory(`${__dirname}/models`).bind(
  {
    clientOptions: {
      contactPoints: ['192.168.1.1','192.168.1.2'],
      protocolOptions: {
        port: 9042
      },
      keyspace: 'my_keyspace',
      queryOptions: {
        consistency: cassandra.consistencies.one
      },
      authProvider: new cassandra.driver.auth.PlainTextAuthProvider('user', 'myPassword'),
      socketOptions: {
        readTimeout: 0
      }
    },
    ormOptions: {
      defaultReplicationStrategy: {
        class: 'SimpleStrategy',
        replication_factor: 3
      },
      migration: 'alter'
    },
    function(err) {
      if (err) throw err;
    }
  }
);

I have a cluster setup on a local network, which has 2 seed nodes and 6 other nodes.

If I check the log file, the last entry on each of the cassandra logs file is -

INFO  [MigrationStage:1] 2019-01-10 08:08:31,037 ColumnFamilyStore.java:396 - Initializing my_keyspace.materialized_view_by_id

And no error messages or anything else. If I check the node.js errors, it does not give any error messages, just the initial startup message. It looks like everything is fine, and nothing wrong has happened.

Please keep in mind, that I've changed keyspace, table names/materialized names and user/passwords to a custom ones in this example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant