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
- Alphabetic
- By Inheritance
- Sweeper
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- type SweeperHelmOp = (Datacenter, Either[UnclaimedResources, ConsulOpF[Unit]])
- type SweeperHelmOps = List[SweeperHelmOp]
- final case class UnclaimedResources(n: Int) extends Product with Serializable
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
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- def cleanupLeakedConsulDiscoveryKeys(cfg: NelsonConfig): IO[SweeperHelmOps]
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val log: Logger
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def process(cfg: NelsonConfig)(implicit unclaimedResourceTracker: Kleisli[IO, (Datacenter, Int), Unit]): Stream[IO, Unit]
- def sweeperSink(implicit unclaimedResourceTracker: Kleisli[IO, (Datacenter, Int), Unit]): Sink[IO, SweeperHelmOp]
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- val timer: ~>[IO, IO]
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
- object SingleUnclaimedResource extends Product with Serializable