c

com.digitalasset.canton.topology.processing

TopologyTimestampPlusEpsilonTracker

class TopologyTimestampPlusEpsilonTracker extends NamedLogging

Computes the effective timestamps of topology transactions

Transaction validation and processing depends on the topology state at the given sequencing time. If topology transactions became effective immediately, we would have to inspect every event first if there is a topology state and wait until all the topology processing has finished before evaluating the transaction. This would cause a sequential bottleneck.

To avoid this bottleneck, topology transactions become effective only in the future at an "effective time", where effective time >= sequencingTime + synchronizerParameters.topologyChangeDelay.

However, the synchronizerParameters can change and so can the topologyChangeDelay. So it is non-trivial to apply the right topologyChangeDelay. Also, if the topologyChangeDelay is decreased, the effective timestamps of topology transactions could "run backwards", which would break topology management.

This class computes the effective timestamps of topology transactions from their sequencing timestamps. It makes sure that effective timestamps are strictly monotonically increasing. For better performance, it keeps the current as well as all future topologyChangeDelays in memory, so that all computations can be performed without reading from the database.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TopologyTimestampPlusEpsilonTracker
  2. NamedLogging
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new TopologyTimestampPlusEpsilonTracker(store: TopologyStore[TopologyStoreId], timeouts: ProcessingTimeout, loggerFactory: NamedLoggerFactory)(implicit executionContext: ExecutionContext)

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 adjustTopologyChangeDelay(effectiveTime: EffectiveTime, newTopologyChangeDelay: NonNegativeFiniteDuration)(implicit traceContext: TraceContext): Unit

    Inform the tracker about a potential change to topologyChangeDelay.

    Inform the tracker about a potential change to topologyChangeDelay. Must be called whenever a com.digitalasset.canton.topology.transaction.SynchronizerParametersState is committed. Must not be called for rejections, proposals, and transactions that expire immediately.

    Exceptions thrown

    java.lang.IllegalArgumentException if effectiveTime is not strictly monotonically increasing

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  9. implicit def errorLoggingContext(implicit traceContext: TraceContext): ErrorLoggingContext
    Attributes
    protected
    Definition Classes
    NamedLogging
  10. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  11. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. def logger: TracedLogger
    Attributes
    protected
    Definition Classes
    NamedLogging
  14. val loggerFactory: NamedLoggerFactory
  15. implicit def namedLoggingContext(implicit traceContext: TraceContext): NamedLoggingContext
    Attributes
    protected
    Definition Classes
    NamedLogging
  16. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. def noTracingLogger: Logger
    Attributes
    protected
    Definition Classes
    NamedLogging
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  20. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  21. val timeouts: ProcessingTimeout
  22. def toString(): String
    Definition Classes
    AnyRef → Any
  23. def trackAndComputeEffectiveTime(sequencedTime: SequencedTime, strictMonotonicity: Boolean)(implicit traceContext: TraceContext): FutureUnlessShutdown[EffectiveTime]

    Computes the effective time for a given sequencing time.

    Computes the effective time for a given sequencing time. The computed effective time is strictly monotonically increasing if requested and monotonically increasing otherwise.

    The computed effective time is at least sequencingTime + topologyChangeDelay(sequencingTime).

    The methods of this tracker must be called as follows:

    1. Make sure the topologyStore contains all topology transactions effective at sequencedTime.
    2. Call trackAndComputeEffectiveTime for the first sequenced event. This will also initialize the tracker.
    3. Call adjustTopologyChangeDelay, if the sequenced event at sequencedTime contains a valid topology transaction that changes the topologyChangeDelay.
    4. Call trackAndComputeEffectiveTime for the next sequenced event.
    5. Go to 3.
    strictMonotonicity

    whether the returned effective time must be strictly greater than the previous one computed. As it changes internal state, all synchronizer members must call trackAndComputeEffectiveTime(sequencedTime, true) for exactly the same sequencedTimes (in ascending order). In practice, strictMonotonicity should be true iff the underlying sequenced event contains at least one topology transaction, it is addressed to com.digitalasset.canton.sequencing.protocol.AllMembersOfSynchronizer and it has no topologyTimestamp.

  24. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  25. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  26. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from NamedLogging

Inherited from AnyRef

Inherited from Any

Ungrouped