Skip to content

Commit

Permalink
Addressed review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
tudor-da committed Aug 31, 2021
1 parent 02c7db5 commit 355dadd
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 18 deletions.
2 changes: 0 additions & 2 deletions ledger/ledger-api-test-tool-on-canton/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,5 @@ conformance_test(
"--verbose",
"--concurrent-test-runs=1", # lowered from default #procs to reduce flakes - details in https://github.com/digital-asset/daml/issues/7316
"--include=ParticipantPruningIT",
# Disable tests targeting only multi-participant setups
"--exclude=ParticipantPruningIT:PRDisclosureAndRetroactiveDivulgence",
],
) if not is_windows else None
Original file line number Diff line number Diff line change
Expand Up @@ -524,22 +524,6 @@ private[backend] trait CommonStorageBackend[DB_BATCH] extends StorageBackend[DB_
)"""
}(connection, loggingContext)

pruneWithLogging(queryDescription = "Exercise (consuming) events pruning") {
SQL"""
-- Exercise events (consuming)
delete from participant_events_consuming_exercise delete_events
where
delete_events.event_offset <= $pruneUpToInclusive"""
}(connection, loggingContext)

pruneWithLogging(queryDescription = "Exercise (non-consuming) events pruning") {
SQL"""
-- Exercise events (non-consuming)
delete from participant_events_non_consuming_exercise delete_events
where
delete_events.event_offset <= $pruneUpToInclusive"""
}(connection, loggingContext)

if (pruneAllDivulgedContracts) {
val pruneAfterClause =
participantAllDivulgedContractsPrunedUpToInclusive(connection) match {
Expand All @@ -565,6 +549,22 @@ private[backend] trait CommonStorageBackend[DB_BATCH] extends StorageBackend[DB_
"""
}(connection, loggingContext)
}

pruneWithLogging(queryDescription = "Exercise (consuming) events pruning") {
SQL"""
-- Exercise events (consuming)
delete from participant_events_consuming_exercise delete_events
where
delete_events.event_offset <= $pruneUpToInclusive"""
}(connection, loggingContext)

pruneWithLogging(queryDescription = "Exercise (non-consuming) events pruning") {
SQL"""
-- Exercise events (non-consuming)
delete from participant_events_non_consuming_exercise delete_events
where
delete_events.event_offset <= $pruneUpToInclusive"""
}(connection, loggingContext)
}

private def participantAllDivulgedContractsPrunedUpToInclusive(
Expand Down

0 comments on commit 355dadd

Please sign in to comment.