sandbox-classic: Remove default parameters in SqlLedger.Owner. (#10718)

* sandbox-classic: Remove default parameters in `SqlLedger.Owner`.

The defaults can be dangerous.

CHANGELOG_BEGIN
CHANGELOG_END

* sandbox-classic: Revert LedgerResource's index schema to the mutable one.
This commit is contained in:
Samir Talwar 2021-08-31 14:37:19 +02:00 committed by GitHub
parent 9ef3377864
commit f5e17567f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 3 deletions

View File

@ -87,9 +87,9 @@ private[sandbox] object SqlLedger {
metrics: Metrics, metrics: Metrics,
lfValueTranslationCache: LfValueTranslationCache.Cache, lfValueTranslationCache: LfValueTranslationCache.Cache,
engine: Engine, engine: Engine,
validatePartyAllocation: Boolean = false, validatePartyAllocation: Boolean,
enableAppendOnlySchema: Boolean = false, enableAppendOnlySchema: Boolean,
enableCompression: Boolean = false, enableCompression: Boolean,
)(implicit mat: Materializer, loggingContext: LoggingContext) )(implicit mat: Materializer, loggingContext: LoggingContext)
extends ResourceOwner[Ledger] { extends ResourceOwner[Ledger] {

View File

@ -93,6 +93,9 @@ private[sandbox] object LedgerResource {
metrics = new Metrics(metrics), metrics = new Metrics(metrics),
lfValueTranslationCache = LfValueTranslationCache.Cache.none, lfValueTranslationCache = LfValueTranslationCache.Cache.none,
engine = new Engine(), engine = new Engine(),
validatePartyAllocation = false,
enableAppendOnlySchema = false,
enableCompression = false,
) )
} yield ledger } yield ledger
) )

View File

@ -342,6 +342,7 @@ final class SqlLedgerSpecAppendOnly
engine = new Engine(), engine = new Engine(),
validatePartyAllocation = validatePartyAllocation, validatePartyAllocation = validatePartyAllocation,
enableAppendOnlySchema = true, enableAppendOnlySchema = true,
enableCompression = false,
).acquire()(ResourceContext(system.dispatcher)) ).acquire()(ResourceContext(system.dispatcher))
createdLedgers += ledger createdLedgers += ledger
ledger.asFuture ledger.asFuture