From 1aead9b1211d9d4ac908340981cccf72540d82f0 Mon Sep 17 00:00:00 2001 From: Kirill Tkalenko Date: Thu, 29 Aug 2024 14:27:25 +0300 Subject: [PATCH] IGNITE-23104 Add validation of some fields in GcConfigurationSchema (#4307) --- .../internal/schema/configuration/GcConfigurationSchema.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/schema/src/main/java/org/apache/ignite/internal/schema/configuration/GcConfigurationSchema.java b/modules/schema/src/main/java/org/apache/ignite/internal/schema/configuration/GcConfigurationSchema.java index bdba9bfd9d2..7b83468b7a7 100644 --- a/modules/schema/src/main/java/org/apache/ignite/internal/schema/configuration/GcConfigurationSchema.java +++ b/modules/schema/src/main/java/org/apache/ignite/internal/schema/configuration/GcConfigurationSchema.java @@ -20,6 +20,7 @@ import org.apache.ignite.configuration.annotation.Config; import org.apache.ignite.configuration.annotation.ConfigValue; import org.apache.ignite.configuration.annotation.Value; +import org.apache.ignite.configuration.validation.Range; /** * Garbage collector configuration schema. @@ -27,10 +28,12 @@ @Config public class GcConfigurationSchema { /** Number of garbage collector threads. */ + @Range(min = 1) @Value(hasDefault = true) public int threads = Runtime.getRuntime().availableProcessors(); /** The maximal number of entries in the storage to be garbage collected in a single batch. */ + @Range(min = 0) @Value(hasDefault = true) public int batchSize = 5;