浏览代码

increase MAX_REGISTER_CONTENT_LENGTH (#127491)

We have two more (stateless) use cases related that requires a bit more space. For project lease files, we'd need just 16B to store the cluster UUID and another 8B for two ints. Also for soft-deletions we will extend the cluster state lease to have one more counter for project deletions.

Relates ES-11205
Pooya Salehi 5 月之前
父节点
当前提交
36e2232efc

+ 1 - 1
server/src/main/java/org/elasticsearch/common/blobstore/support/BlobContainerUtils.java

@@ -22,7 +22,7 @@ public class BlobContainerUtils {
         // no instances
     }
 
-    public static final int MAX_REGISTER_CONTENT_LENGTH = 2 * Long.BYTES;
+    public static final int MAX_REGISTER_CONTENT_LENGTH = 3 * Long.BYTES;
 
     public static void ensureValidRegisterContent(BytesReference bytesReference) {
         if (bytesReference.length() > MAX_REGISTER_CONTENT_LENGTH) {

+ 1 - 1
server/src/test/java/org/elasticsearch/common/blobstore/fs/FsBlobContainerTests.java

@@ -237,7 +237,7 @@ public class FsBlobContainerTests extends ESTestCase {
             expectedValue.set(newValue);
         }
 
-        container.writeBlob(randomPurpose(), key, new BytesArray(new byte[17]), false);
+        container.writeBlob(randomPurpose(), key, new BytesArray(new byte[25]), false);
         assertThat(
             safeAwaitFailure(
                 OptionalBytesReference.class,