Packages

c

com.digitalasset.canton.console.commands

LocalParticipantRepairAdministration

abstract class LocalParticipantRepairAdministration extends ParticipantRepairAdministration

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. LocalParticipantRepairAdministration
  2. ParticipantRepairAdministration
  3. Helpful
  4. NoTracing
  5. FeatureFlagFilter
  6. NamedLogging
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new LocalParticipantRepairAdministration(consoleEnvironment: ConsoleEnvironment, runner: AdminCommandRunner, loggerFactory: NamedLoggerFactory)

Abstract Value Members

  1. abstract def access[T](handler: (ParticipantNodeCommon) => T): T
    Attributes
    protected

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def add(domain: DomainAlias, contractsToAdd: Seq[SerializableContractWithWitnesses], ignoreAlreadyAdded: Boolean = true, ignoreStakeholderCheck: Boolean = false): Unit
    Annotations
    @Summary(s = "Add specified contracts to specific domain on local participant.", flag = console.this.Help.Summary.<init>$default$2) @Description(s = """This is a last resort command to recover from data corruption, e.g. in scenarios in which participant
    |contracts have somehow gotten out of sync and need to be manually created. The participant needs to be
    |disconnected from the specified "domain" at the time of the call, and as of now the domain cannot have had
    |any inflight requests.
    |For each "contractsToAdd", specify "witnesses", local parties, in case no local party is a stakeholder.
    |The "ignoreAlreadyAdded" flag makes it possible to invoke the command multiple times with the same
    |parameters in case an earlier command invocation has failed.
    |
    |As repair commands are powerful tools to recover from unforeseen data corruption, but dangerous under normal
    |operation, use of this command requires (temporarily) enabling the "features.enable-repair-commands"
    |configuration. In addition repair commands can run for an unbounded time depending on the number of
    |contracts passed in. Be sure to not connect the participant to the domain until the call returns.
    |
    The arguments are:
    - domain: the alias of the domain to which to add the contract
    - contractsToAdd: list of contracts to add with witness information
    - ignoreAlreadyAdded: (default true) if set to true, it will ignore contracts that already exist on the target domain.
    - ignoreStakeholderCheck: (default false) if set to true, add will work for contracts that don't have a local party (useful for party migration).
    """
    )
  5. def add(domainId: DomainId, protocolVersion: ProtocolVersion, contractsToAdd: Seq[SerializableContractWithWitnesses], onboardedParties: Set[PartyId]): Unit
    Definition Classes
    ParticipantRepairAdministration
    Annotations
    @Summary(s = "Add specified contracts to specific domain on local participant.", flag = console.this.Help.Summary.<init>$default$2) @Description(s = """This is a last resort command to recover from data corruption, e.g. in scenarios in which participant
    |contracts have somehow gotten out of sync and need to be manually created. The participant needs to be
    |disconnected from the specified "domain" at the time of the call, and as of now the domain cannot have had
    |any inflight requests.
    |The effects of the command will take affect upon reconnecting to the sync domain.
    |As repair commands are powerful tools to recover from unforeseen data corruption, but dangerous under normal
    |operation, use of this command requires (temporarily) enabling the "features.enable-repair-commands"
    |configuration. In addition repair commands can run for an unbounded time depending on the number of
    |contracts passed in. Be sure to not connect the participant to the domain until the call returns.
    |
    The arguments are:
    - domainId: the id of the domain to which to add the contract
    - protocolVersion: to protocol version used by the domain
    - contractsToAdd: list of contracts to add with witness information
    """
    )
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def cantonConfig: CantonConfig
    Attributes
    protected
    Definition Classes
    FeatureFlagFilter
  8. def change_domain(contractIds: Seq[LfContractId], sourceDomain: DomainAlias, targetDomain: DomainAlias, skipInactive: Boolean = true, batchSize: Int = 100): Unit
    Annotations
    @Summary(s = "Move contracts with specified Contract IDs from one domain to another.", flag = console.this.Help.Summary.<init>$default$2) @Description(s = """This is a last resort command to recover from data corruption in scenarios in which a domain is
    |irreparably broken and formerly connected participants need to move contracts to another, healthy domain.
    |The participant needs to be disconnected from both the "sourceDomain" and the "targetDomain". Also as of now
    |the target domain cannot have had any inflight requests.
    |Contracts already present in the target domain will be skipped, and this makes it possible to invoke this
    |command in an "idempotent" fashion in case an earlier attempt had resulted in an error.
    |The "skipInactive" flag makes it possible to only move active contracts in the "sourceDomain".
    |As repair commands are powerful tools to recover from unforeseen data corruption, but dangerous under normal
    |operation, use of this command requires (temporarily) enabling the "features.enable-repair-commands"
    |configuration. In addition repair commands can run for an unbounded time depending on the number of
    |contract ids passed in. Be sure to not connect the participant to either domain until the call returns.

    Arguments:
    - contractIds - set of contract ids that should be moved to the new domain
    - sourceDomain - alias of the source domain
    - targetDomain - alias of the target domain
    - skipInactive - (default true) whether to skip inactive contracts mentioned in the contractIds list
    - batchSize - (default 100) how many contracts to write at once to the database"""
    )
  9. def check[T](flag: FeatureFlag)(command: => T): T
    Attributes
    protected
    Definition Classes
    FeatureFlagFilter
  10. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
  11. val consoleEnvironment: ConsoleEnvironment
  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  14. implicit def errorLoggingContext(implicit traceContext: TraceContext): ErrorLoggingContext
    Attributes
    protected
    Definition Classes
    NamedLogging
  15. def export_acs(parties: Set[PartyId], partiesOffboarding: Boolean, outputFile: String = ParticipantRepairAdministration.ExportAcsDefaultFile, filterDomainId: Option[DomainId] = None, timestamp: Option[Instant] = None, contractDomainRenames: Map[DomainId, (DomainId, ProtocolVersion)] = Map.empty): Unit
    Definition Classes
    ParticipantRepairAdministration
    Annotations
    @Summary(s = "Export active contracts for the given set of parties to a file.", flag = console.this.Help.Summary.<init>$default$2) @Description(s = """This command exports the current Active Contract Set (ACS) of a given set of parties to ACS snapshot file.
    |Afterwards, the 'import_acs' command allows importing it into a participant's ACS again.
    |Such ACS export (and import) is interesting for recovery and operational purposes only.
    |Note that the 'export_acs' command execution may take a long time to complete and may require significant
    |resources.
    |
    |The arguments are:
    |- parties: identifying contracts having at least one stakeholder from the given set
    |- partiesOffboarding: true if the parties will be offboarded (party migration)
    |- outputFile: the output file name where to store the data. Use .gz as a suffix to get a compressed file (recommended)
    |- filterDomainId: restrict the export to a given domain
    |- timestamp: optionally a timestamp for which we should take the state (useful to reconcile states of a domain)
    |- contractDomainRenames: As part of the export, allow to rename the associated domain id of contracts from one domain to another based on the mapping.
    """
    )
  16. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  17. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  18. def help(methodName: String)(implicit consoleEnvironment: ConsoleEnvironment): Unit
    Definition Classes
    Helpful
    Annotations
    @Summary(s = "Help for specific commands (use help() or help(\"method\") for more information)", flag = console.this.Help.Summary.<init>$default$2) @Topic(t = Seq("Top-level Commands"))
  19. def help()(implicit consoleEnvironment: ConsoleEnvironment): Unit
    Definition Classes
    Helpful
  20. def ignore_events(domainId: DomainId, fromInclusive: SequencerCounter, toInclusive: SequencerCounter, force: Boolean = false): Unit
    Definition Classes
    ParticipantRepairAdministration
    Annotations
    @Summary(s = "Mark sequenced events as ignored.", flag = console.this.Help.Summary.<init>$default$2) @Description(s = """This is the last resort to ignore events that the participant is unable to process.
    |Ignoring events may lead to subsequent failures, e.g., if the event creating a contract is ignored and
    |that contract is subsequently used. It may also lead to ledger forks if other participants still process
    |the ignored events.
    |It is possible to mark events as ignored that the participant has not yet received.
    |
    |The command will fail, if marking events between `fromInclusive` and `toInclusive` as ignored would result in a gap in sequencer counters,
    |namely if `from <= to` and `from` is greater than `maxSequencerCounter + 1`,
    |where `maxSequencerCounter` is the greatest sequencer counter of a sequenced event stored by the underlying participant.
    |
    |The command will also fail, if `force == false` and `from` is smaller than the sequencer counter of the last event
    |that has been marked as clean.
    |(Ignoring such events would normally have no effect, as they have already been processed.)"""
    )
  21. def import_acs(inputFile: String = ParticipantRepairAdministration.ExportAcsDefaultFile, onboardedParties: Set[PartyId], workflowIdPrefix: String = ""): Unit
    Definition Classes
    ParticipantRepairAdministration
    Annotations
    @Summary(s = "Import active contracts from an Active Contract Set (ACS) snapshot file.", flag = console.this.Help.Summary.<init>$default$2) @Description(s = """This command imports contracts from an ACS snapshot file into the participant's ACS.
    |The given ACS snapshot file needs to be the resulting file from a previous 'export_acs' command invocation.
    |
    |Arguments are:
    | - inputFile: the path to the file containing the ACS export
    | - onboardedParties: the list of new parties whose contracts are imported
    """
    )
  22. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  23. def logger: TracedLogger
    Attributes
    protected
    Definition Classes
    NamedLogging
  24. val loggerFactory: NamedLoggerFactory
  25. def migrate_domain(source: DomainAlias, target: DomainConnectionConfig, force: Boolean = false): Unit
    Definition Classes
    ParticipantRepairAdministration
    Annotations
    @Summary(s = "Migrate contracts from one domain to another one.", flag = console.this.Help.Summary.<init>$default$2) @Description(s = """Migrates all contracts associated with a domain to a new domain.
    |This method will register the new domain, connect to it and then re-associate all contracts from the source
    |domain to the target domain. Please note that this migration needs to be done by all participants
    |at the same time. The target domain should only be used once all participants have finished their migration.
    |
    |WARNING: The migration does not start in case of in-flight transactions on the source domain. Forcing the
    |migration may lead to a ledger fork! Instead of forcing the migration, ensure the source domain has no
    |in-flight transactions by reconnecting all participants to the source domain, halting activity on these
    |participants and waiting for the in-flight transactions to complete or time out.
    |Forcing a migration is intended for disaster recovery when a source domain cannot be recovered anymore.
    |
    |The arguments are:
    |source: the domain alias of the source domain
    |target: the configuration for the target domain
    |force: if true, migration is forced ignoring in-flight transactions. Defaults to false.
    """
    )
  26. implicit def namedLoggingContext(implicit traceContext: TraceContext): NamedLoggingContext
    Attributes
    protected
    Definition Classes
    NamedLogging
  27. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  28. def noTracingLogger: Logger
    Attributes
    protected
    Definition Classes
    NamedLogging
  29. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  30. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  31. def purge(domain: DomainAlias, contractIds: Seq[LfContractId], offboardedParties: Set[PartyId], ignoreAlreadyPurged: Boolean = true): Unit
    Definition Classes
    ParticipantRepairAdministration
    Annotations
    @Summary(s = "Purge contracts with specified Contract IDs from local participant.", flag = console.this.Help.Summary.<init>$default$2) @Description(s = """This is a last resort command to recover from data corruption, e.g. in scenarios in which participant
    |contracts have somehow gotten out of sync and need to be manually purged, or in situations in which
    |stakeholders are no longer available to agree to their archival. The participant needs to be disconnected from
    |the domain on which the contracts with "contractIds" reside at the time of the call, and as of now the domain
    |cannot have had any inflight requests.
    |The effects of the command will take affect upon reconnecting to the sync domain.
    |The "ignoreAlreadyPurged" flag makes it possible to invoke the command multiple times with the same
    |parameters in case an earlier command invocation has failed.
    |As repair commands are powerful tools to recover from unforeseen data corruption, but dangerous under normal
    |operation, use of this command requires (temporarily) enabling the "features.enable-repair-commands"
    |configuration. In addition repair commands can run for an unbounded time depending on the number of
    |contract ids passed in. Be sure to not connect the participant to the domain until the call returns.
    |
    |Arguments are:
    | - inputFile: the path to the file containing the ACS export
    | - offboardedParties: the list of parties that will be offboarded after the purge."""
    )
  32. def purge_deactivated_domain(domain: DomainAlias): Unit
    Definition Classes
    ParticipantRepairAdministration
    Annotations
    @Summary(s = "Purge select data of a deactivated domain.", flag = console.this.Help.Summary.<init>$default$2) @Description(s = """This command deletes selected domain data and helps to ensure that stale data in the specified, deactivated domain
    |is not acted upon anymore. The specified domain needs to be in the `Inactive` status for purging to occur.
    |Purging a deactivated domain is typically performed automatically as part of a hard domain migration via
    |``repair.migrate_domain``."""
    )
  33. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  34. def toString(): String
    Definition Classes
    AnyRef → Any
  35. implicit def traceContext: TraceContext
    Attributes
    protected
    Definition Classes
    NoTracing
  36. def unignore_events(domainId: DomainId, fromInclusive: SequencerCounter, toInclusive: SequencerCounter, force: Boolean = false): Unit
    Definition Classes
    ParticipantRepairAdministration
    Annotations
    @Summary(s = "Remove the ignored status from sequenced events.", flag = console.this.Help.Summary.<init>$default$2) @Description(s = """This command has no effect on ordinary (i.e., not ignored) events and on events that do not exist.
    |
    |The command will fail, if marking events between `fromInclusive` and `toInclusive` as unignored would result in a gap in sequencer counters,
    |namely if there is one empty ignored event with sequencer counter between `from` and `to` and
    |another empty ignored event with sequencer counter greater than `to`.
    |An empty ignored event is an event that has been marked as ignored and not yet received by the participant.
    |
    |The command will also fail, if `force == false` and `from` is smaller than the sequencer counter of the last event
    |that has been marked as clean.
    |(Unignoring such events would normally have no effect, as they have already been processed.)"""
    )
  37. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  38. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  39. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def download(parties: Set[PartyId], partiesOffboarding: Boolean, outputFile: String = ParticipantRepairAdministration.DefaultFile, filterDomainId: String = "", timestamp: Option[Instant] = None, protocolVersion: Option[ProtocolVersion] = None, chunkSize: Option[PositiveInt] = None, contractDomainRenames: Map[DomainId, DomainId] = Map.empty): Unit
    Definition Classes
    ParticipantRepairAdministration
    Annotations
    @Summary(s = "Download all contracts for the given set of parties to a file.", flag = console.this.Help.Summary.<init>$default$2) @Description(s = """This command can be used to download the current active contract set of a given set of parties to a text file.
    |This is mainly interesting for recovery and operational purposes.
    |
    |The file will contain base64 encoded strings, one line per contract. The lines are written
    |sorted according to their domain and contract id. This allows to compare the contracts stored
    |by two participants using standard file comparison tools.
    |The domain-id is printed with the prefix domain-id before the block of contracts starts.
    |
    |This command may take a long time to complete and may require significant resources.
    |It will first load the contract ids of the active contract set into memory and then subsequently
    |load the contracts in batches and inspect their stakeholders. As this operation needs to traverse
    |the entire datastore, it might take a long time to complete.
    |
    |The command will return a map of domainId -> number of active contracts stored
    |
    The arguments are:
    - parties: identifying contracts having at least one stakeholder from the given set
    - partiesOffboarding: true if the parties will be offboarded (party migration)
    - outputFile: the output file name where to store the data. Use .gz as a suffix to get a compressed file (recommended)
    - filterDomainId: restrict the export to a given domain
    - timestamp: optionally a timestamp for which we should take the state (useful to reconcile states of a domain)
    - protocolVersion: optional the protocol version to use for the serialization. Defaults to the one of the domains.
    - chunkSize: size of the byte chunks to stream back: default 1024 * 1024 * 2 = (2MB)
    - contractDomainRenames: As part of the export, allow to rename the associated domain id of contracts from one domain to another based on the mapping.
    """
    )
    @deprecated
    Deprecated

    (Since version 2.8.0) Use export_acs

  2. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated @Deprecated
    Deprecated
  3. def upload(inputFile: String = ParticipantRepairAdministration.DefaultFile): Unit
    Definition Classes
    ParticipantRepairAdministration
    Annotations
    @Summary(s = "Import ACS snapshot", flag = console.this.Help.Summary.<init>$default$2) @Description(s = """Uploads a binary into the participant's ACS""") @deprecated
    Deprecated

    (Since version 2.8.0) Use import_acs

Inherited from Helpful

Inherited from NoTracing

Inherited from FeatureFlagFilter

Inherited from NamedLogging

Inherited from AnyRef

Inherited from Any

Ungrouped