Packages

final class Reconciliation extends AnyRef

For reconciling the tag_views table with the messages table. Can be used to:

- Fix data issues caused by split brains or persistence ids running in multiple locations - Continue tag writes after a node crash (using continueTagWritesForPersistenceId) - Rebuild tag views from scratch (using rebuildTagViewForPersistenceIds)

Important: Most operations (delete, truncate, rebuild) should only be run when the affected persistence ids are NOT running. Running these while actors are actively persisting can cause data corruption or gaps in tag sequences. The exception is continueTagWritesForPersistenceId which is safe to run while the application is running.

API likely to change when a java/scaladsl is added.

Annotations
@ApiMayChange()
Source
Reconciliation.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Reconciliation
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Reconciliation(systemProvider: ClassicActorSystemProvider)
  2. new Reconciliation(systemProvider: ClassicActorSystemProvider, settings: ReconciliationSettings)

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 allTags(): Source[String, NotUsed]

    Returns all the tags in the journal.

    Returns all the tags in the journal. This is not an efficient query for Cassandra so it is better to calculate tags for calls to deleteTagViewForPersistenceId another way.

    Prefer to do batches of persistence ids at a time getting the tags just for that persistence id.

  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]) @native()
  7. def continueTagWritesForPersistenceId(persistenceId: String): Future[Done]

    Continues tag writes from where they left off by only writing events that are newer than the current progress (seqNr > progress.sequenceNr).

    Continues tag writes from where they left off by only writing events that are newer than the current progress (seqNr > progress.sequenceNr).

    Use this when a node crashed or was stopped while tag writes were pending, and you want to complete those writes without the actor having to restart. This is more efficient than rebuildTagViewForPersistenceIds as it:

    - Starts reading from the minimum progress sequence number (not from 0) - Only writes events that are actually missing

    Concurrency safety: This method can be run while the corresponding actor is running. Tag writes are idempotent because:

    - The timeUuid is from the original event in the main journal (immutable) - The tag_pid_sequence_nr is derived deterministically from the progress baseline

    If both the running actor and this tool process the same events, they will calculate the same tag_pid_sequence_nr values, resulting in the same primary key. Cassandra's upsert behavior ensures no duplicates.

  8. def deleteTagViewForPersistenceIds(persistenceId: Set[String], tag: String): Future[Done]

    Scans the given tag and deletes all events for the provided persistence ids.

    Scans the given tag and deletes all events for the provided persistence ids. All events for a persistence id have to be deleted as not to leave gaps in the tag pid sequence numbers. Also deletes the tag progress for the persistence ids.

    Warning: Do not run this while the affected persistence ids are actively running. Concurrent writes from running actors will cause data inconsistencies.

  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  11. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  16. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  17. def rebuildAllPersistenceIds(): Future[Done]
  18. def rebuildTagViewForPersistenceIds(persistenceId: String): Future[Done]

    Rebuilds the tag view for a persistence id by writing ALL events to the tag_views table.

    Rebuilds the tag view for a persistence id by writing ALL events to the tag_views table.

    Important: This method should only be used after deleteTagViewForPersistenceIds or truncateTagView has been called. Running rebuild on existing data will create duplicate entries with different tag_pid_sequence_nr values, causing gaps that will be detected by eventsByTag queries.

    Warning: Do not run this while the persistence id is actively running. Stop the actor first, then rebuild.

    Use this for:

    - Rebuilding after deleteTagViewForPersistenceIds or truncateTagView - Initial population when tag writing was previously disabled

    For continuing incomplete tag writes (e.g., after a crash), use continueTagWritesForPersistenceId instead.

  19. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  20. def tagsForPersistenceId(persistenceId: String): Future[Set[String]]

    Select all the tags for the given persistence id.

    Select all the tags for the given persistence id. This may not return tags that have just been used for the first time.

  21. def toString(): String
    Definition Classes
    AnyRef → Any
  22. def truncateTagView(): Future[Done]

    Truncate all tag related tables and all metadata so that it can be rebuilt.

    Truncate all tag related tables and all metadata so that it can be rebuilt.

    Warning: Do not run this while the application is running. Stop all persistent actors first, then truncate, then rebuild or restart the application.

  23. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  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()

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 AnyRef

Inherited from Any

Ungrouped