JSON API Query Store documentation out of date, help needed
- gyorgybalazsiOP
The documentation says:
Note
When you use the Query Store you’ll want your first run to specify
createSchema=trueso that all the necessary tables are created. After the first run make surecreateSchema=falseso that it doesn’t attempt to create the tables again.See: HTTP JSON API Service — Daml SDK 1.16.0 documentation
It turns out that the
createSchema=true/falseoption is deprecated, from the help text:[main] WARN com.daml.http.JdbcConfig$ - The option 'createSchema' is deprecated. Please use 'start-mode=create-only' for 'createSchema=true' and 'start-mode=start-only' for 'createSchema=false'Do I need to do the same with these options as is written in the docs for the previous version? Meaning:
At first run, use the ‘start-mode=create-only’ option.
Afterwards use the ‘start-mode=start-only’.Or do something else?
- cocreature 2
Yes the same applies to the new options. They are equivalent to the existing ones. Alternatively you can use
start-mode=create-if-needed-and-startwhich will create the schema if it doesn’t exist or is in compatible (e.g. after an sdk upgrade) and start in one go. - gyorgybalazsi
This last one aeems to be the most convenient, thanks
- bartcant
For my current implementation it appears the
start-mode=create-if-needed-and-startdid not create the schema. I am on JDK 1.13.1
I still had to start the JSONAPI withcreateSchema=truefirst before starting it up withstart-mode=create-if-needed-and-startOnly afterwards my websocket failures disappeared in the UX
- victor.pr.mueller
Very weird, I thought my test coverage was working correctly but from what you tell it looks like something went wrong. Thanks for the report, I will take a look and see if I can fix it fast.
(By the one who implemented that feature
) - victor.pr.mueller
One question though, what SDK version are you using and do you use a specific database backend?
- victor.pr.mueller
I’m still waiting for more input on this topic, because our tests do cover what you report doesn’t work. Could you open an issue here on github with reproduction steps, sdk version, os etc.?
- bartcant
We use Postgresql and SDK 1.13.1
- victor.pr.mueller
I believe that with a newer SDK version the mechanism should work correctly. Could you upgrade to SDK 1.16.0 and try again?