o

nelson.cleanup

Sweeper

object Sweeper

Infrequently running cleanup of "leaked" data or data which is otherwise unaccounted for. Unlike the cleanup process (which is optimized for precision and efficiency), the Sweeper is optimized for comprehensiveness over time via repeated execution (even if we miss some "garbage" on execution i, we will eventually clean it up on excution i + N). We only need to ensure that we 1.) cleanup data that was missed during the Cleanup operation and 2.) ensure we aren't progressively leaking resources over the long-term.

Items that are identified as an "UnclaimedResource" (items that have no obvious owner -- which may or may not be garbage) are NOT deleted but will be tracked and counted by the end of the task. The number of Unclaimed Resources will be recorded as a histogram, to allow us to have visibility of accumulation on such items. In the event that we discover that the amount of Unclaimed Resources is increasing over time this is a possible indication that we have a major leakage signaling the need to modify the sweeper to be more aggressive.

Source
Sweeper.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Sweeper
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. type SweeperHelmOp = (Datacenter, Either[UnclaimedResources, ConsulOpF[Unit]])
  2. type SweeperHelmOps = List[SweeperHelmOp]
  3. final case class UnclaimedResources(n: Int) extends Product with Serializable

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. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def cleanupLeakedConsulDiscoveryKeys(cfg: NelsonConfig): IO[SweeperHelmOps]
  6. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. val log: Logger
  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 process(cfg: NelsonConfig)(implicit unclaimedResourceTracker: Kleisli[IO, (Datacenter, Int), Unit]): Stream[IO, Unit]
  18. def sweeperSink(implicit unclaimedResourceTracker: Kleisli[IO, (Datacenter, Int), Unit]): Sink[IO, SweeperHelmOp]
  19. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  20. val timer: ~>[IO, IO]
  21. def toString(): String
    Definition Classes
    AnyRef → Any
  22. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  25. object SingleUnclaimedResource extends Product with Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped