Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
Description
The S3 data store tries to create a thread pool with
maxConnections - writeThreads
but this will fail if you specify the same value for both or less maxConnections than writeThreads, and throw:
Caused by: org.apache.jackrabbit.core.data.DataStoreException: Could not initialize S3 from {s3Encryption=SSE_S3, component.name=org.apache.jackrabbit.oak.plugins.blob.datastore.S3DataStore, maxConnections=40, secretKey=XXXXXXX, writeThreads=40, service.vendor=The Apache Software Foundation, s3Bucket=XXXXX, socketTimeout=120000, service.pid=org.apache.jackrabbit.oak.plugins.blob.datastore.S3DataStore, component.id=79, connectionTimeout=120000, accessKey=XXXXXXX, s3EndPoint=s3.amazonaws.com, s3Region=us-standard, maxErrorRetry=10, path=./crx-quickstart/repository/datastore} at org.apache.jackrabbit.aws.ext.ds.S3Backend.init(S3Backend.java:188) at org.apache.jackrabbit.aws.ext.ds.S3Backend.init(S3Backend.java:121) at org.apache.jackrabbit.core.data.CachingDataStore.init(CachingDataStore.java:267) ... 23 common frames omitted Caused by: java.lang.IllegalArgumentException: null at java.util.concurrent.ThreadPoolExecutor.<init>(ThreadPoolExecutor.java:1310) at java.util.concurrent.ThreadPoolExecutor.<init>(ThreadPoolExecutor.java:1233) at java.util.concurrent.Executors.newFixedThreadPool(Executors.java:114) at org.apache.jackrabbit.aws.ext.ds.S3Backend.init(S3Backend.java:174) ... 25 common frames omitted
It's also not intuitive at all. Maybe it's better to specify the thread pools explicitly, i.e. writeThreads and otherThreads (whatever that 2nd pool exactly is).