Skip to content
CCPEDIAby Unity Nodes
App Development

JSON API Query Store documentation out of date, help needed

9 posts332 views2 likesLast activity Sep 2021

  1. gyorgybalazsiOP

    The documentation says:

    Note

    When you use the Query Store you’ll want your first run to specify createSchema=true so that all the necessary tables are created. After the first run make sure createSchema=false so 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/false option 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?

  2. 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-start which will create the schema if it doesn’t exist or is in compatible (e.g. after an sdk upgrade) and start in one go.

  3. gyorgybalazsi

    This last one aeems to be the most convenient, thanks

  4. bartcant

    For my current implementation it appears the start-mode=create-if-needed-and-start did not create the schema. I am on JDK 1.13.1
    I still had to start the JSONAPI with createSchema=true first before starting it up with start-mode=create-if-needed-and-start

    Only afterwards my websocket failures disappeared in the UX

  5. 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 :joy_cat:)

  6. victor.pr.mueller

    One question though, what SDK version are you using and do you use a specific database backend?

  7. 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.?

  8. bartcant

    We use Postgresql and SDK 1.13.1

  9. 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?