daml/libs-scala
Stephen Compall e5c4734780
enable JSON search index on Oracle by default (#10539)
* unconditionally enable JSON search index on Oracle

In '1kb of data' and larger Oracle integration tests:

ORA-29902: error in executing ODCIIndexStart() routine
ORA-20000: Oracle Text error:
DRG-50943: query token too long on line 1 on column 3

From https://docs.oracle.com/en/database/oracle/oracle-database/19/errmg/DRG-10000.html#GUID-46BC3B3F-4DB7-4EB4-85DA-55E9461966CB

    Cause: A query token is longer than 256 bytes

    Action: Rewrite query

* add changelog

CHANGELOG_BEGIN
- [JSON API] The Oracle database schema has changed; if using
  ``--query-store-jdbc-config``, you must rebuild the database by adding
  ``,start-mode=create-only``.  See #10539.
CHANGELOG_END

* test only 1kb

* extra flag in db config string

* let Queries backends configure themselves from maps

* new Queries constructor dataflow to better support config values

* remove fields as we go, isolating backend-specific from -agnostic conf

- we use StateT to avoid the problems that will definitely arise if we
  don't DRY.

* fix up DbConfig including DbStartupMode

* start to uncouple json-api's config from db-utils

* two JdbcConfigs with different purposes/scopes

- also moves db-utils contents to com.daml.dbutils

* adapt trigger service to refactoring

* fix JdbcConfig leftovers

* adapt http-json-cli to new JdbcConfig

* remove extra ConfigCompanion

* explain more about the QueryBackend/Queries distinction

* split SupportedJdbcDriver into two phases with a tparam

* use SupportedJdbcDriver.TC instead of SupportedJdbcDriver as the nullary typeclass

* patch around all the moved objects with imports

* missed import from moving ConnectionPool to dbutils

* use new 2-phase SupportedJdbcDriver for ContractDao setup

* left off part of a comment

* more q.queries imports

* other imports from the dbutils move

* nested JdbcConfig

* configure the driver in each backend-specific test

* very confusing error, but make the imports nicer and it goes away

* nested JdbcConfig in perf

* missing newline

* port contractdao-bench

* test new option parsing all the way through QueryBackend

* disable search index for some tests, enable for others

* add changelog

CHANGELOG_BEGIN
- [Trigger Service] ``--help`` no longer advertises unsupported JDBC
  options from JSON API.

- [JSON API] [EE only] By default, on Oracle, sets up a JSON search
  index to speed up the queries endpoints.  However, Oracle versions
  prior to 19.12 have an unrecoverably buggy implementation of this
  index; in addition, the current implementation fails on queries with
  strings >256 bytes, with no way to disable the index for that query.

  Pass the ``disableContractPayloadIndexing=true`` option as part of
  ``--query-store-jdbc-config`` to disable this index when creating the
  schema.
  See `issue #10539 <https://github.com/digital-asset/daml/pull/10539>`__.
CHANGELOG_END

* port failure tests

* init version table last, drop first

- suggested by @realvictorprm; thanks

* rename split DBConfig.scala

- suggested by @realvictorprm; thanks

* move imports to not be in alphabetical order

- suggested by @realvictorprm; thanks

* remove createSchema

- suggested by @realvictorprm; thanks

* Revert "test only 1kb"

This reverts commit 616e173e63.

* port to scala 2.12

- bug in unused imports

- old name `-` for `removed`
2021-08-31 09:29:36 +00:00
..
adjustable-clock update copyright notices for 2021 (#8257) 2021-01-01 19:49:51 +01:00
auth-utils update copyright notices for 2021 (#8257) 2021-01-01 19:49:51 +01:00
build-info update copyright notices for 2021 (#8257) 2021-01-01 19:49:51 +01:00
concurrent Switch from @silent to @nowarn. (#9498) 2021-04-26 19:46:14 +00:00
contextualized-logging participant-integration-api: Fix completion debug log output. (#10415) 2021-07-27 12:53:38 +00:00
db-utils enable JSON search index on Oracle by default (#10539) 2021-08-31 09:29:36 +00:00
doobie-slf4j Add //libs-scala/doobie-slf4j and replace usages of jdkLogHandler (#8731) 2021-02-03 10:45:05 +00:00
flyway-testing Upgrade Flyway to v7. (#10594) 2021-08-17 10:29:13 +00:00
fs-utils Example export (#9756) 2021-05-21 09:36:25 +02:00
gatling-utils Upgrade Scalatest to v3.2.9. (#10576) 2021-08-12 23:19:35 +00:00
grpc-reverse-proxy Enhance grpc-test-utils and grpc-reverse-proxy to use Resources (#8606) 2021-01-25 13:27:48 +01:00
grpc-server-reflection-client Enhance grpc-test-utils and grpc-reverse-proxy to use Resources (#8606) 2021-01-25 13:27:48 +01:00
grpc-test-utils Upgrade Scalatest to v3.2.9. (#10576) 2021-08-12 23:19:35 +00:00
grpc-utils Enhance grpc-test-utils and grpc-reverse-proxy to use Resources (#8606) 2021-01-25 13:27:48 +01:00
logging-entries Move logging value definitions alongside their objects. (#10439) 2021-07-29 09:21:27 +00:00
nameof Publish nameof library (#9798) 2021-05-26 09:58:02 +00:00
oracle-testing Introduce dependency on Oracle image version (#10597) 2021-08-17 13:28:26 +00:00
ports Upgrade scalafmt and enable trailing commas (#8437) 2021-01-09 11:37:37 +01:00
postgresql-testing Upgrade Scalatest to v3.2.9. (#10576) 2021-08-12 23:19:35 +00:00
resources resources: Only mutate test mock objects inside synchronized blocks. (#9869) 2021-06-01 12:50:42 +00:00
resources-akka participant-integration-api: Use Scheduler, and add more tests to configuration initialization. [KVL-1046] (#10461) 2021-08-03 14:49:00 +00:00
resources-grpc Restrict extensibility of ServerResourceOwner (#8660) 2021-01-28 10:47:28 +00:00
scala-utils [JSON-API/trigger-service] Refactor db conn (#10497) 2021-08-09 09:56:58 +00:00
scalatest-utils Upgrade Scalatest to v3.2.9. (#10576) 2021-08-12 23:19:35 +00:00
timer-utils timer-utils: If RetryStrategy eventually fails, explain what happened. (#10511) 2021-08-09 07:32:25 +00:00