/** * Sweeps the next batch for the given shard and strategy. If the sweep is successful, we delete the processed * writes from the sweep queue and then update the sweep queue progress accordingly. * * @param shardStrategy shard and strategy to use */ @SuppressWarnings("checkstyle:RegexpMultiline") // Suppress VisibleForTesting warning @VisibleForTesting public void sweepNextBatch(ShardAndStrategy shardStrategy) { assertInitialized(); if (!runSweep.get()) { metrics.registerOccurrenceOf(SweepOutcome.DISABLED); return; } long maxTsExclusive = Sweeper.of(shardStrategy).getSweepTimestamp(timestampsSupplier); queue.sweepNextBatch(shardStrategy, maxTsExclusive); }
/** * Sweeps the next batch for the given shard and strategy. If the sweep is successful, we delete the processed * writes from the sweep queue and then update the sweep queue progress accordingly. * * @param shardStrategy shard and strategy to use */ @SuppressWarnings("checkstyle:RegexpMultiline") // Suppress VisibleForTesting warning @VisibleForTesting public void sweepNextBatch(ShardAndStrategy shardStrategy) { assertInitialized(); if (!runSweep.get()) { metrics.registerOccurrenceOf(SweepOutcome.DISABLED); return; } long maxTsExclusive = Sweeper.of(shardStrategy).getSweepTimestamp(timestampsSupplier); queue.sweepNextBatch(shardStrategy, maxTsExclusive); }