In rare situations a canton participant returns a SUBMISSION_ALREADY_IN_FLIGHT
error instead of DUPLICATE_COMMAND due to a possible race condition between
publishing the TransactionAccepted read service update and updating internal
in-flight transactions. Particularly in Oracle runs this can result in a
subsequence "duplicate" command to still be considered in-flight.
Extended the tests to also accept the "in-flight" error code.
Changelog_begin
Changelog_end
updateTime can return an error and the code correctly tried to turn
that into invalidArgument and logged it. However, the Either returned
by that then got completely discarded and the overall request
succeeded which definitely seems like a bug.
I added a test and verified that it fails withotu this change.
The code seems fairly messy. There are a few reasons for that:
1. We use Future[Either[…]] and we treat failures in the Either
differently from future failures. I'm not quite convinced that
makes sense but for this PR I didn’t want to introduce unrelated
changed.
2. Future[Either[…]] without some form of EitherT is inherently messy
but afaik you don’t use cats here so I kept it like this.
* Support for golden signals metrics on akka-http
Adds metrics support needed for throughput, error rate, latency,
and data size on both the classic http endpoints and
the websocket endpoints.
Installed the support on the JSON API endpoints.
CHANGELOG_BEGIN
JSON API - additional metrics for endpoints
daml_http_json_api_requests_total
daml_http_json_api_errors_total
daml_http_json_api_requests_duration_seconds
daml_http_json_api_requests_size_bytes
daml_http_json_api_responses_size_bytes
daml_http_json_api_websocket_messages_received_total
daml_http_json_api_websocket_messages_received_size_bytes
daml_http_json_api_websocket_messages_sent_total
daml_http_json_api_websocket_messages_sent_size_bytes
CHANGELOG_END
Co-authored-by: Miklos <57664299+miklos-da@users.noreply.github.com>
* Extract Ledger API error definitions in //ledger/error-definitions
changelog_begin
SERVICE_INTERNAL_ERROR error code is created in CommonErrors and replaces the usage of LEDGER_API_INTERNAL_ERROR in ledger-api-client (as a fix).
changelog_end
* Tests in //ledger/error do not depend on //ledger/ledger-api-errors
* Remove unused dependency from //ledger/error
changelog_begin
changelog_end
* Address Martino's comment
* Precompute ScalaPB serializedSize for stream messages
changelog_begin
Introduces a gRPC streams optimization targeting complex protobuf payloads.
When enabled, it can allow up to 60-80% throughput increase for GetTransactions/GetTransactionTrees/GetActiveContracts.
The optimization is toggleable by an additional config parameter for the API server: `api-server.optimize-grpc-streams-throughput`
changelog_end
* Address Marton's review comment
* Update ledger/participant-integration-api/src/main/scala/platform/store/ScalaPbStreamingOptimizations.scala
Co-authored-by: mziolekda <marcin.ziolek@digitalasset.com>
* Rename to withPrecomputedSerializedSize
Co-authored-by: mziolekda <marcin.ziolek@digitalasset.com>
changelog_begin
changelog_end
Status quo:
ledger-api-domain's domain object contained three classes related to parties:
1. `PartyDetails`, the oldest, which didn't contain the metadata field and was used both in client and indexer code,
2. `ParticipantPartyDetails`, added recently during the participant-local metadata extensions, similar to the `PartyDetails` above but additionally contains the metadata field,
3. `PartyRecord` which held participant-local metadata extensions for a party.
Changes:
1) `PartyDetails` gets renamed to `IndexerPartyDetails` and together with `PartyEntry` gets moved to participant-state-index Bazel package and is removed from client code,
2) `ParticipantPartyDetails` gets renamed to `PartyDetails` and is now used in the client code instead.
3) `PartyRecord` gets moved to participant-local-store Bazel package
* InMemUserMngtImpl: Introducece custom in-mem user repr to better handle resource versions. Fix not updating isDeactivated property
* Generalize concurrent change control tests for users and party records
* Move backend files such that related localstore files are separated from other files
* Remove unneeded nesting in ParticipantParty object
* Document rights in revoke/grant requests as optional. More conformance tests for users rights
changelog_begin
changelog_end
changelog_begin
changelog_end
By doing this change we are loosing some detailed test coverage, but preventing future spurious compatibility tests failures.