* Introduce CLI option for input buffer size
Also improves CLI help text for other back-pressure related options.
changelog_begin
[Sandbox] Allow to configure --input-buffer-size, which allows to tune the number of commands waiting to be submitted before the Sandbox applies back-pressure, run daml sandbox --help for more info.
changelog_end
* Update ledger/sandbox/src/main/scala/com/digitalasset/platform/sandbox/cli/Cli.scala
Co-authored-by: Samir Talwar <samir.talwar@digitalasset.com>
Co-authored-by: Samir Talwar <samir.talwar@digitalasset.com>
* events denormalization, WIP
* too soon to drop
* migration script
* add generated sha256 digest
* fixing the migration script naming
has to be double undescore after the version number
* flat event table queries
* write witnesses to events table during insert; disable inserts to witnesses tables
* use varchar[] for new witness columns instead of text[]
* ::varchar[] cast
* remove event witnesses table support code
* lookupFlatTransactionById works for postgres
* lookupTransactionTreeById works with postgres
* fixing the queries, replacing @> with &&
* cleanup
* multi-party postgres queries, WIP
* fixing multi-party queries, thanks @stefano.baghino
* fixing wildcardParties query
* minor cleanup
* h2 schema changes, h2 queries is WIP
* inlining some constants
* SqlFunctions introduced
* reformat
* Adding `SqlFunctions.arrayIntersectionValues`
* Adding `SqlFunctions.arrayIntersectionValues`
* Removing truncates for deleted tables
* Removing truncates for deleted tables
* filtering tree_event_witnesses
Co-authored-by: Stephen Compall <stephen.compall@daml.com>
* replace NodeExercises#controllers with controllersDifferFromActors
* remove controllers from ActorMismatch and scenario service exercise
* no changelog
CHANGELOG_BEGIN
CHANGELOG_END
* remove reserved ID #s in scenario-service grpc
As discussed, we don't need to worry about
version mismatches.
Co-authored-by: Remy <remy.haemmerle@daml.com>
* Moved caching related classes to under validator.caching package.
* Introduced CacheUpdatePolicy for controlling what type of state keys should be updated in the cache and when.
* Consistently use 'cache update policy'.
CHANGELOG_BEGIN
CHANGELOG_END
* Made it explicit what policy we are testing against.
* Making `PaginatingAsyncStream.streamFrom` more generic
so it does not specify what exactly `Offset` is.
changelog_begin
changelog_end
* Addressing code review comments + cleanup
* Add additional metrics when storing transactions
Since event witnesses will soon be denormalized into the participant_events
table, I did not include metrics right now.
CHANGELOG_BEGIN
[DAML Ledger Integration Kit] Add additional metrics for storing transactions. The overall time is measured by ``daml.index.db.store_ledger_entry``.
- Timer ``daml.index.db.store_ledger_entry.prepare_batches``: measures the time for preparing batch insert/delete statements
- Timer ``daml.index.db.store_ledger_entry.events_batch``: measures the time for inserting events
- Timer ``daml.index.db.store_ledger_entry.delete_contract_witnesses_batch``: measures the time for deleting contract witnesses
- Timer ``daml.index.db.store_ledger_entry.delete_contracts_batch``: measures the time for deleting contracts
- Timer ``daml.index.db.store_ledger_entry.insert_contracts_batch``: measures the time for inserting contracts
- Timer ``daml.index.db.store_ledger_entry.insert_contract_witnesses_batch``: measures the time for inserting contract witnesses
- Timer ``daml.index.db.store_ledger_entry.insert_completion``: measures the time for inserting the completion
- Timer ``daml.index.db.store_ledger_entry.update_ledger_end``: measures the time for updating the ledger end
[Sandbox Classic] Added Timer ``daml.index.db.store_ledger_entry.commit_validation``: measure the time for commit validation in Sandbox Classic
CHANGELOG_END
* Refactoring: rename metrics *dao to *DbMetrics
* Experiment: replacing row OFFSET with ledger offset in the flat transactions query for one party.
if this improves the perf numbers, the rest of the queries can be updated.
* Flat transaction query optimization:
replacing row offset with ledger offset
* Flat transaction query optimization:
replacing row offset with ledger offset
* transaction tree query optimization
changelog_begin
[Sandbox-next/Postgres]
Flat Transaction Stream, Transaction Tree Stream SQL query optimizations.
Pagination based on Ledger Offset instead of SQL Row Offset.
changelog_end
* Addressing code review comments
* Expose the DAML profiler in Sandbox Classic
This PR adds an option `--profile-dir` to Sandbox Classic which takes
a directory as its argument. When this option is used, all command
submissions to the Sandbox are run in profiling more and the resulting
profiling information is written to the directory specified via
`--profile-dir`. See `/ledger/sandbox/README.md#Profiling` for further
details on this.
CHANGELOG_BEGIN
CHANGELOG_END
* Adapt DAML-LF REPL
CHANGELOG_BEGIN
CHANGELOG_END
CHANGELOG_BEGIN
[DAML Ledger Integration Kit]: Added 4 new metrics for more detailed execution time statistics:
- Timer ``daml.execution.lookup_active_contract_per_execution``: measures the accumulated time spent for looking up active contracts per execution
- Histogram ``daml.execution.lookup_active_contract_count_per_execution``: measures the number of active contract lookups per execution
- Timer ``daml.execution.lookup_contract_key_per_execution``: measures the accumulated time spent for looking up contract keys per execution
- Histogram ``daml.execution.lookup_contract_key_count_per_execution``: measures the number of contract key lookups per execution
CHANGELOG_END
* disable Any wart
* first pass removal of Any suppressions for false positives
* second pass removal of Any suppressions for false positives
* no changelog
CHANGELOG_BEGIN
CHANGELOG_END
* third pass removal of Any suppressions for false positives
* fourth pass removal of Any suppressions for false positives
* reformat newly single-suppressions into single lines
- suggested by @SamirTalwar-DA; thanks
* Don't store archived divulged contracts
Specifically, don't keep contracts that
have been divulged AND archived
in the same transaction.
Even if the archival of a divulged contract
might not be visible to all locally hosted
parties, the ledger would reject all
commands that try to use archived
contracts anyway.
CHANGELOG_BEGIN
CHANGELOG_END
* Add test
* Fix compile error
* Fix issues cause by migration V25 and V26
Fixes#6017
Please note that migrating sandbox-classic from version 1.0.0 to 1.1.1 will cause
undefined behavior if the result is used to back a running ledger setup.
No migration should end at 1.1.1 and they should move past that until the version
that applies this fix to make sure the index database is in a consistent state.
Full write-up on the issue here: https://github.com/digital-asset/daml/issues/6017#issuecomment-634040972
changelog_begin
[Sandbox Classic] Fix issue in migrating to version 1.1.1. If you did migrate to
version 1.1.1, do not use the resulting setup but make sure to migrate until this
version, which fixes the issue
See https://github.com/digital-asset/daml/issues/6017
changelog_end
* Add trailing newline
* Fix wrong hash for migration
* Address https://github.com/digital-asset/daml/pull/6107#discussion_r430469918
* Ensure that on first call to ReadService.stateUpdates beginOffset is None
Fixes#6023
CHANGELOG_BEGIN
CHANGELOG_END
Also restores correct advice in CONTRIBUTING.md
* Update with review comments
* Revert "disable test pending tracking down duplicates"
This reverts commit 8b5f9dfa04.
* activeContracts tells caller the ledgerEnd, rather than accepting activeAt argument
* naive port of http-json tests to sandbox-next
* Revert "naive port of http-json tests to sandbox-next"
This reverts commit 91d4590c90.
* lock before grabbing acs and ledgerEnd offset in InMemoryLedger
- as suggested by @gerolf-da; thanks
This image can be built with:
```
bazel run //ledger/sandbox:sandbox-next-image
```
This will, unfortunately, also run a container, which you will need to
kill with _Ctrl+C_. You can use `bazel build`, but this will only build
the image tarballs, which you need to import into your Docker image
repository yourself.
CHANGELOG_BEGIN
CHANGELOG_END
CHANGELOG_BEGIN
- Add `LedgerClient#close`, which will shut down the channel and await
termination. This is optional; the channel will still be shut down on
JVM exit if this method is not called.
CHANGELOG_END
This is offered as a compromise for those who would like to ensure
resources are shut down cleanly, while not making the API more
complicated. I originally wanted to make `LedgerClient.fromBuilder`
return a `Resource[LedgerClient]`, but the `Resource` API would lead to
an increased learning curve for users.
by adding synchronize call between an alpha-participant-create and the
corresponding beta-participant-exercise.
changelog_begin
changelog_end
We occasionally run into this in Canton
Furthermore, uses a work stealing thread pool for work JdbcLedgerDao has
to perform outside of the database thread pool. This solves some
flakiness observed in conformance tests against PostgreSQL-backed
ledgers.
changelog_begin
changelog_end
changelog_begin
OVERRIDES CHANGELOG ENTRY FROM 2a8c93a614
[Ledger Integration Kit] Added new metrics for
``daml.index.db.*.translation`` to measure the time spent
translating to and from the serialized DAML-LF values when
fetched from the participant index.
changelog_end
* Port PerformanceEnvelope.TransactionSize perf test from Canton
to LedgerApiTestTool --perf-tests
changelog_begin
[Ledger Api Test Tool] Added the TransactionSize performance benchmark test.
changelog_end
* Review feedback from Samir
* Formatting