Skip to content

Commit

Permalink
update canton to 20241003.14216.vfdbf1885 (#20055)
Browse files Browse the repository at this point in the history
Co-authored-by: Azure Pipelines Daml Build <[email protected]>
Co-authored-by: Remy Haemmerle <[email protected]>
  • Loading branch information
3 people authored Oct 4, 2024
1 parent 751c4b3 commit 076d088
Show file tree
Hide file tree
Showing 186 changed files with 2,710 additions and 3,457 deletions.
3 changes: 0 additions & 3 deletions sdk/canton/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,6 @@ scala_macro_library(
],
unused_dependency_checker_mode = "error",
deps = [
"@maven//:com_typesafe_slick_slick_2_13",
"@maven//:org_typelevel_cats_core_2_13",
"@maven//:org_typelevel_cats_kernel_2_13",
"@maven//:org_wartremover_wartremover_2_13_11",
Expand Down Expand Up @@ -1003,12 +1002,10 @@ scala_library(
"@maven//:com_google_protobuf_protobuf_java",
"@maven//:com_h2database_h2",
"@maven//:com_lihaoyi_pprint_2_13",
"@maven//:com_oracle_database_jdbc_ojdbc8",
"@maven//:com_thesamet_scalapb_scalapb_runtime_2_13",
"@maven//:com_typesafe_config",
"@maven//:com_typesafe_scala_logging_scala_logging_2_13",
"@maven//:com_typesafe_slick_slick_2_13",
"@maven//:com_zaxxer_HikariCP",
"@maven//:dev_optics_monocle_core_2_13",
"@maven//:dev_optics_monocle_macro_2_13",
"@maven//:io_circe_circe_core_2_13",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ object CantonConfig {
lazy implicit val lengthLimitedStringReader: ConfigReader[LengthLimitedString] =
ConfigReader.fromString[LengthLimitedString] { str =>
Either.cond(
str.nonEmpty && str.length <= defaultMaxLength,
str.nonEmpty && str.length <= defaultMaxLength.unwrap,
new LengthLimitedStringVar(str, defaultMaxLength)(),
InvalidLengthString(str),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,10 @@ object CommunityConfigValidations
server <- getPropStr("serverName")
port <- getPropInt("portNumber")
dbName <- getPropStr("databaseName")
url = dbConfig match {
case _: H2DbConfig => DbConfig.h2Url(dbName)
case _: PostgresDbConfig => DbConfig.postgresUrl(server, port, dbName)
// Assume Oracle
case _ => DbConfig.oracleUrl(server, port, dbName)
url <- dbConfig match {
case _: H2DbConfig => Some(DbConfig.h2Url(dbName))
case _: PostgresDbConfig => Some(DbConfig.postgresUrl(server, port, dbName))
case other => throw new IllegalArgumentException(s"Unsupported DbConfig: $other")
}
} yield url

Expand Down
2 changes: 1 addition & 1 deletion sdk/canton/community/app/src/pack/config/participant.conf
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ canton.participants.participant {
num-writes = 6
}
max-connections = 18
// Optional define the ledger-api jdbc URL directly (used for Oracle backends)
// Optional define the ledger-api jdbc URL directly
ledger-api-jdbc-url = ${?_shared.storage.ledger-api-jdbc-url}
}

Expand Down
29 changes: 0 additions & 29 deletions sdk/canton/community/base/src/main/resources/rewrite-appender.xml
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,6 @@
<testing>true</testing>
</rewrite>

<!-- Emitted when trying to connect to the database and Oracle is not ready yet -->
<rewrite class="com.digitalasset.canton.logging.Rewrite">
<logger>com.zaxxer.hikari.pool.HikariPool</logger>
<maxLevel>INFO</maxLevel>
<contains>Exception during pool initialization</contains>
<testing>true</testing>
</rewrite>

<!-- Expected warnings that are emitted by grpc itself; used for GrpcConnectionErrorsIntegrationTest -->
<rewrite class="com.digitalasset.canton.logging.Rewrite">
<logger>
Expand Down Expand Up @@ -167,27 +159,6 @@
<testing>true</testing>
</rewrite>

<!-- Parallel indexer on Oracle-based conformance tests runs into Oracle-upsert race.
The problem should only occur when storing packages.
However, we can't restrict the rule to the packages table, because the error message does not mention the affected table.
Since the rules are rather broad, it is applied during testing only.
The rules should be removed once https://digitalasset.atlassian.net/browse/DPP-562 is done.
-->
<rewrite class="com.digitalasset.canton.logging.Rewrite">
<logger>com.digitalasset.canton.platform.indexer.RecoveringIndexer</logger>
<contains>Error while running indexer, restart scheduled</contains>
<maxLevel>INFO</maxLevel>
<testing>true</testing>
</rewrite>
<rewrite class="com.digitalasset.canton.logging.Rewrite"> <!-- version for Oracle -->
<logger>com.digitalasset.canton.platform.store.appendonlydao.DbDispatcher</logger>
<contains>Processing the request failed due to a non-transient database error: ORA-00001: unique constraint</contains>
<exceptionMessage>ORA-00001: unique constraint</exceptionMessage>
<maxLevel>INFO</maxLevel>
<testing>true</testing>
</rewrite>
<rewrite class="com.digitalasset.canton.logging.Rewrite"> <!-- version for H2 -->
<logger>com.digitalasset.canton.platform.store.appendonlydao.DbDispatcher</logger>
<contains>Processing the request failed due to a non-transient database error: Unique index or primary key violation</contains>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import com.typesafe.scalalogging.Logger
import java.util.concurrent.*
import java.util.concurrent.atomic.AtomicInteger
import java.util.function.Predicate
import scala.concurrent.{ExecutionContext, blocking}
import scala.concurrent.{ExecutionContextExecutor, blocking}

/** Factories and utilities for dealing with threading.
*/
Expand Down Expand Up @@ -225,7 +225,7 @@ object Threading {
}
}

def directExecutionContext(logger: Logger): ExecutionContext = DirectExecutionContext(
def directExecutionContext(logger: Logger): ExecutionContextExecutor = DirectExecutionContext(
logger
)

Expand Down
Loading

0 comments on commit 076d088

Please sign in to comment.