diff --git a/ledger/ledger-on-sql/BUILD.bazel b/ledger/ledger-on-sql/BUILD.bazel index 555d64a1cc0c..f5fa4563ba7c 100644 --- a/ledger/ledger-on-sql/BUILD.bazel +++ b/ledger/ledger-on-sql/BUILD.bazel @@ -404,7 +404,7 @@ conformance_test( ) conformance_test( - name = "conformance-test-append-only-in-memory-fan-out", + name = "conformance-test-append-only-in-memory-fan-out-postgres", ports = [6865], server = ":conformance-test-postgresql-bin", server_args = [ @@ -420,6 +420,23 @@ conformance_test( ], ) +conformance_test( + name = "conformance-test-append-only-in-memory-fan-out-oracle", + ports = [6865], + server = ":conformance-test-oracle-bin", + server_args = [ + "--contract-id-seeding=testing-weak", + "--participant participant-id=conformance-test,port=6865,contract-state-cache-max-size=1,contract-key-state-cache-max-size=1,ledger-api-transactions-buffer-max-size=10", + "--index-append-only-schema-unsafe", + "--mutable-contract-state-cache-unsafe", + "--buffered-ledger-api-streams-unsafe", + ], + tags = [] if oracle_testing else ["manual"], + test_tool_args = [ + "--verbose", + ], +) + conformance_test( name = "conformance-test-append-only-pruning-postgres", ports = [6865], @@ -463,9 +480,10 @@ conformance_test( server = ":conformance-test-oracle-bin", server_args = [ "--contract-id-seeding=testing-weak", - "--participant participant-id=conformance-test,port=6865,contract-state-cache-max-size=1,contract-key-state-cache-max-size=1", + "--participant participant-id=conformance-test,port=6865,contract-state-cache-max-size=1,contract-key-state-cache-max-size=1,ledger-api-transactions-buffer-max-size=10", "--index-append-only-schema-unsafe", "--mutable-contract-state-cache-unsafe", + "--buffered-ledger-api-streams-unsafe", ], tags = [] if oracle_testing else ["manual"], test_tool_args = [ @@ -532,9 +550,10 @@ conformance_test( server = ":conformance-test-oracle-bin", server_args = [ "--contract-id-seeding=testing-weak", - "--participant participant-id=conformance-test,port=6865,contract-state-cache-max-size=1,contract-key-state-cache-max-size=1", + "--participant participant-id=conformance-test,port=6865,contract-state-cache-max-size=1,contract-key-state-cache-max-size=1,ledger-api-transactions-buffer-max-size=10", "--index-append-only-schema-unsafe", "--mutable-contract-state-cache-unsafe", + "--buffered-ledger-api-streams-unsafe", ], tags = [] if oracle_testing else ["manual"], test_tool_args = [ diff --git a/ledger/participant-integration-api/src/main/resources/db/migration/oracle-appendonly/V1__Append_only_schema.sha256 b/ledger/participant-integration-api/src/main/resources/db/migration/oracle-appendonly/V1__Append_only_schema.sha256 index 8e5fd6b56281..0f7e677dc53f 100644 --- a/ledger/participant-integration-api/src/main/resources/db/migration/oracle-appendonly/V1__Append_only_schema.sha256 +++ b/ledger/participant-integration-api/src/main/resources/db/migration/oracle-appendonly/V1__Append_only_schema.sha256 @@ -1 +1 @@ -3a97d06a4b4c852487e8145296297805e0f1eee2cfb462558f13c21ae2cfcf47 +7f4fb78d28927012f3c4b3a91b87b38dbebdd6c32f3654cf23fb75213be096ba diff --git a/ledger/participant-integration-api/src/main/resources/db/migration/oracle-appendonly/V1__Append_only_schema.sql b/ledger/participant-integration-api/src/main/resources/db/migration/oracle-appendonly/V1__Append_only_schema.sql index 50be50d188b1..7447e0aad999 100644 --- a/ledger/participant-integration-api/src/main/resources/db/migration/oracle-appendonly/V1__Append_only_schema.sql +++ b/ledger/participant-integration-api/src/main/resources/db/migration/oracle-appendonly/V1__Append_only_schema.sql @@ -427,11 +427,11 @@ SELECT cast(0 as SMALLINT) AS event_kind, to_clob('[]') AS create_signatories, to_clob('[]') AS create_observers, cast(NULL as VARCHAR2(4000)) AS create_agreement_text, - EMPTY_BLOB() AS create_key_value, + NULL AS create_key_value, cast(NULL as VARCHAR2(4000)) AS create_key_hash, cast(NULL as VARCHAR2(4000)) AS exercise_choice, - EMPTY_BLOB() AS exercise_argument, - EMPTY_BLOB() AS exercise_result, + NULL AS exercise_argument, + NULL AS exercise_result, to_clob('[]') AS exercise_actors, to_clob('[]') AS exercise_child_event_ids, participant_events_divulgence.create_argument_compression, @@ -462,8 +462,8 @@ SELECT (10) AS event_kind, participant_events_create.create_key_value, participant_events_create.create_key_hash, cast(NULL as VARCHAR2(4000)) AS exercise_choice, - EMPTY_BLOB() AS exercise_argument, - EMPTY_BLOB() AS exercise_result, + NULL AS exercise_argument, + NULL AS exercise_result, to_clob('[]') AS exercise_actors, to_clob('[]') AS exercise_child_event_ids, participant_events_create.create_argument_compression, diff --git a/ledger/participant-integration-api/src/main/scala/platform/store/backend/common/CommonStorageBackend.scala b/ledger/participant-integration-api/src/main/scala/platform/store/backend/common/CommonStorageBackend.scala index 44f5340fc50f..f017a7939c31 100644 --- a/ledger/participant-integration-api/src/main/scala/platform/store/backend/common/CommonStorageBackend.scala +++ b/ledger/participant-integration-api/src/main/scala/platform/store/backend/common/CommonStorageBackend.scala @@ -847,7 +847,8 @@ private[backend] trait CommonStorageBackend[DB_BATCH] extends StorageBackend[DB_ ).foreach(_.execute()(connection)) } - private val rawTransactionEventParser: RowParser[RawTransactionEvent] = + private val rawTransactionEventParser: RowParser[RawTransactionEvent] = { + import com.daml.platform.store.Conversions.ArrayColumnToStringArray.arrayColumnToStringArray (int("event_kind") ~ str("transaction_id") ~ int("node_index") ~ @@ -912,6 +913,7 @@ private[backend] trait CommonStorageBackend[DB_BATCH] extends StorageBackend[DB_ offset, ) } + } def rawEvents(startExclusive: Long, endInclusive: Long)( connection: Connection diff --git a/ledger/participant-integration-api/src/test/suite/scala/platform/store/dao/JdbcLedgerDaoOracleAppendOnlySpec.scala b/ledger/participant-integration-api/src/test/suite/scala/platform/store/dao/JdbcLedgerDaoOracleAppendOnlySpec.scala index 36fb9f0b18e3..8e9ee6c05344 100644 --- a/ledger/participant-integration-api/src/test/suite/scala/platform/store/dao/JdbcLedgerDaoOracleAppendOnlySpec.scala +++ b/ledger/participant-integration-api/src/test/suite/scala/platform/store/dao/JdbcLedgerDaoOracleAppendOnlySpec.scala @@ -12,14 +12,18 @@ class JdbcLedgerDaoOracleAppendOnlySpec with JdbcLedgerDaoSuite with JdbcLedgerDaoBackendOracleAppendOnly with JdbcLedgerDaoPackagesSpec - with JdbcLedgerDaoPartiesSpec - with JdbcLedgerDaoConfigurationSpec - with JdbcLedgerDaoConfigurationAppendOnlySpec with JdbcLedgerDaoActiveContractsSpec with JdbcLedgerDaoCompletionsSpec + with JdbcLedgerDaoConfigurationSpec + with JdbcLedgerDaoConfigurationAppendOnlySpec with JdbcLedgerDaoContractsSpec + with JdbcLedgerDaoContractsAppendOnlySpec with JdbcLedgerDaoDivulgenceSpec + with JdbcLedgerDaoExceptionSpec + with JdbcLedgerDaoPartiesSpec with JdbcLedgerDaoTransactionsSpec with JdbcLedgerDaoTransactionTreesSpec + with JdbcLedgerDaoContractEventsStreamSpec with JdbcLedgerDaoTransactionsWriterSpec + with JdbcLedgerDaoTransactionLogUpdatesSpec with JdbcAppendOnlyTransactionInsertion