From df46de038bc58aeab66b13b56bc6722b2c41cc51 Mon Sep 17 00:00:00 2001 From: Henning Andersen Date: Thu, 25 Jan 2024 22:49:56 +0100 Subject: [PATCH] nits --- .../blobcache/shared/SharedBlobCacheService.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/x-pack/plugin/blob-cache/src/main/java/org/elasticsearch/blobcache/shared/SharedBlobCacheService.java b/x-pack/plugin/blob-cache/src/main/java/org/elasticsearch/blobcache/shared/SharedBlobCacheService.java index 4cf57b14b9de6..f89285ae61cc0 100644 --- a/x-pack/plugin/blob-cache/src/main/java/org/elasticsearch/blobcache/shared/SharedBlobCacheService.java +++ b/x-pack/plugin/blob-cache/src/main/java/org/elasticsearch/blobcache/shared/SharedBlobCacheService.java @@ -1419,23 +1419,26 @@ private void appendLevel1ToLevel0() { var front1 = freqs[1]; if (front0 == null) { freqs[0] = front1; - decrementFreqList(front1); freqs[1] = null; + decrementFreqList(front1); assert front1 == null || invariant(front1, true); - } else if (front1 != null){ + } else if (front1 != null) { var back0 = front0.prev; var back1 = front1.prev; assert invariant(front0, true); assert invariant(front1, true); assert invariant(back0, true); assert invariant(back1, true); + decrementFreqList(front1); front0.prev = back1; back0.next = front1; front1.prev = back0; assert back1.next == null; + freqs[1] = null; + assert invariant(front0, true); assert invariant(front1, true); assert invariant(back0, true);