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.
- Alphabetic
- By Inheritance
- TopologyTimestampPlusEpsilonTracker
- NamedLogging
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new TopologyTimestampPlusEpsilonTracker(store: TopologyStore[TopologyStoreId], timeouts: ProcessingTimeout, loggerFactory: NamedLoggerFactory)(implicit executionContext: ExecutionContext)
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- 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
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- implicit def errorLoggingContext(implicit traceContext: TraceContext): ErrorLoggingContext
- Attributes
- protected
- Definition Classes
- NamedLogging
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def logger: TracedLogger
- Attributes
- protected
- Definition Classes
- NamedLogging
- val loggerFactory: NamedLoggerFactory
- Definition Classes
- TopologyTimestampPlusEpsilonTracker → NamedLogging
- implicit def namedLoggingContext(implicit traceContext: TraceContext): NamedLoggingContext
- Attributes
- protected
- Definition Classes
- NamedLogging
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def noTracingLogger: Logger
- Attributes
- protected
- Definition Classes
- NamedLogging
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- val timeouts: ProcessingTimeout
- def toString(): String
- Definition Classes
- AnyRef → Any
- 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:
- Make sure the topologyStore contains all topology transactions effective at
sequencedTime
. - Call trackAndComputeEffectiveTime for the first sequenced event. This will also initialize the tracker.
- Call adjustTopologyChangeDelay, if the sequenced event at
sequencedTime
contains a valid topology transaction that changes the topologyChangeDelay. - Call trackAndComputeEffectiveTime for the next sequenced event.
- 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 samesequencedTime
s (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.
- Make sure the topologyStore contains all topology transactions effective at
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])