prepare statements fail if table was created after the application started running
opened this issue · comments
Throwing "unconfigured table" exception for prepared statements even though the table was created.
Steps to reproduce:
Prerequisites:
Make sure the table does not exist in cassandra
- Start your application with prepared statements
- Should see "unconfigured table" exceptions
- Create the table in Cassandra
- You will still see the "unconfigured table" exceptions
Note: It happens only with Prepared Statements and Phantom-DSL version 2.22.0
Not reproducible in Phantom-DSL version 2.16.4.
Hi @lakshmankhcl, could you please share some code?
We do test prepared statements extensively.
Non asynchronous prepared statements need to be lazy
defined, otherwise they will trigger immediately, which is possibly the source of your problems.
Hi @lakshmankhcl I'm going to close this now, as I feel it's application specific rather than query specific.
In theory, you are executing those prepared statements ahead of time, and simply using lazy
or whatever approach to make sure you don't trigger the prepared statements before the table is created is something that needs to be done on an application level, there's not much we can do from a framework perspective.
Even if we tracked all prepared statements globally within the framework, we wouldn't be able to do anymore than give you the same error Cassandra already does, and it would be also be a runtime error.