The short circuiting renormalizer used with ML anomaly detection will skip renormalizations if a more recent set of quantiles has been received.  It does this by maintaining a queue of quantiles documents, but when it is ready to perform the next renormalization it drains the entire queue so that it is left with the most recent.  When quantiles documents are large this is an inefficient use of memory.  Instead of storing the full quantiles documents in a queue it should just retain the most recently added quantiles document.
x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/output/AutodetectResultProcessor.java
private final Client client;
    private final AnomalyDetectionAuditor auditor;
    private final String jobId;
    private final Renormalizer renormalizer;
    private final JobResultsPersister persister;
    private final AutodetectProcess process;
    private final TimingStatsReporter timingStatsReporter;
    private final Clock clock;
    final CountDownLatch completionLatch = new CountDownLatch(1);
    final Semaphore updateModelSnapshotSemaphore = new Semaphore(1);
    private final FlushListener flushListener;
    private volatile boolean processKilled;
    private volatile boolean failed;
    private final Map<String, ForecastRequestStats> runningForecasts;
    private final long priorRunsBucketCount;
    private long currentRunBucketCount; 
    private final JobResultsPersister.Builder bulkResultsPersister;
    private final AnnotationPersister.Builder bulkAnnotationsPersister;
    private boolean deleteInterimRequired;
    /**
     * New model size stats are read as the process is running
     */
    private volatile ModelSizeStats latestModelSizeStats;
    public AutodetectResultProcessor(
        Client client,
        AnomalyDetectionAuditor auditor,
        String jobId,
        Renormalizer renormalizer,
        JobResultsPersister persister,
        AnnotationPersister annotationPersister,