Joscorbe commented on code in PR #2426: URL: https://github.com/apache/jackrabbit-oak/pull/2426#discussion_r2253529946
########## oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/Configuration.java: ########## @@ -87,6 +87,74 @@ "overridden via framework property 'oak.mongo.leaseSocketTimeout'") int mongoLeaseSocketTimeout() default DocumentNodeStoreService.DEFAULT_MONGO_LEASE_SO_TIMEOUT_MILLIS; + @AttributeDefinition( + name = "MongoDB Max Pool Size", + description = "The maximum number of connections in the MongoDB connection pool. " + + "Note that this value can be overridden via framework property 'oak.mongo.maxPoolSize'") + int mongoMaxPoolSize() default DocumentNodeStoreService.DEFAULT_MONGO_MAX_POOL_SIZE; + + @AttributeDefinition( + name = "MongoDB Min Pool Size", + description = "The minimum number of connections in the MongoDB connection pool. " + + "Note that this value can be overridden via framework property 'oak.mongo.minPoolSize'") + int mongoMinPoolSize() default DocumentNodeStoreService.DEFAULT_MONGO_MIN_POOL_SIZE; + + @AttributeDefinition( + name = "MongoDB Max Connecting", + description = "Maximum number of connections the MongoDB pool may be establishing concurrently. " + + "Note that this value can be overridden via framework property 'oak.mongo.maxConnecting'") + int mongoMaxConnecting() default DocumentNodeStoreService.DEFAULT_MONGO_MAX_CONNECTING; + + @AttributeDefinition( + name = "MongoDB Max Idle Time (ms)", + description = "The maximum idle time in milliseconds of a MongoDB pooled connection. " + + "A value of 0 means no limit. " + + "Note that this value can be overridden via framework property 'oak.mongo.maxIdleTimeMS'") + int mongoMaxIdleTimeMS() default DocumentNodeStoreService.DEFAULT_MONGO_MAX_IDLE_TIME_MS; + + @AttributeDefinition( + name = "MongoDB Max Life Time (ms)", + description = "The maximum lifetime in milliseconds of a MongoDB pooled connection. " + + "A value of 0 means no limit. " + + "Note that this value can be overridden via framework property 'oak.mongo.maxLifeTimeMS'") + int mongoMaxLifeTimeMS() default DocumentNodeStoreService.DEFAULT_MONGO_MAX_LIFE_TIME_MS; + + @AttributeDefinition( + name = "MongoDB Connect Timeout (ms)", + description = "The connection timeout in milliseconds for establishing connections to MongoDB. " + + "Note that this value can be overridden via framework property 'oak.mongo.connectTimeoutMS'") + int mongoConnectTimeoutMS() default DocumentNodeStoreService.DEFAULT_MONGO_CONNECT_TIMEOUT_MS; + + @AttributeDefinition( + name = "MongoDB Heartbeat Frequency (ms)", + description = "The frequency in milliseconds of the driver checking the state of MongoDB servers. " + + "Note that this value can be overridden via framework property 'oak.mongo.heartbeatFrequencyMS'") + int mongoHeartbeatFrequencyMS() default DocumentNodeStoreService.DEFAULT_MONGO_HEARTBEAT_FREQUENCY_MS; + + @AttributeDefinition( + name = "MongoDB Server Selection Timeout (ms)", + description = "How long the driver will wait for server selection to succeed before throwing an exception, in milliseconds. " + + "Note that this value can be overridden via framework property 'oak.mongo.serverSelectionTimeoutMS'") + int mongoServerSelectionTimeoutMS() default DocumentNodeStoreService.DEFAULT_MONGO_SERVER_SELECTION_TIMEOUT_MS; Review Comment: Changed, thanks! ########## oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreService.java: ########## @@ -144,7 +142,19 @@ public class DocumentNodeStoreService { static final boolean DEFAULT_EMBEDDED_VERIFICATION_ENABLED = true; static final int DEFAULT_FULL_GC_MODE = 0; static final int DEFAULT_FULL_GC_GENERATION = 0; - static final int DEFAULT_MONGO_LEASE_SO_TIMEOUT_MILLIS = 30000; + public static final int DEFAULT_MONGO_LEASE_SO_TIMEOUT_MILLIS = 30000; + // MongoDB Connection Pool Settings + public static final int DEFAULT_MONGO_MAX_POOL_SIZE = 100; + public static final int DEFAULT_MONGO_MIN_POOL_SIZE = 0; + public static final int DEFAULT_MONGO_MAX_CONNECTING = 2; + public static final int DEFAULT_MONGO_MAX_IDLE_TIME_MS = 0; Review Comment: Applied to all similar cases, thanks! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: oak-dev-unsubscr...@jackrabbit.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org