You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow AWS_LAMBDA_MAX_CONCURRENCY to be one and crash the RIC Otherwise and Version Bump to 2.8.2 (#92)
* Allow AWS_LAMBDA_MAX_CONCURRENCY to be one and crash the RIC Otherwise.
* Version Bump to 2.8.2
---------
Authored-by: Mohammed Ehab <moehabe@amazon.com>
Copy file name to clipboardExpand all lines: aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/ReservedRuntimeEnvironmentVariables.java
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -108,8 +108,8 @@ public interface ReservedRuntimeEnvironmentVariables {
108
108
StringTZ = "TZ";
109
109
110
110
/*
111
-
* Used to set the required number of concurrent runtime loops,
112
-
* If AWS_LAMBDA_MAX_CONCURRENCY is not set, the default number of concurrent runtime loops is the number of cores.
111
+
* If set to a string parsable as an integer > 0, It enables multiconcurrency mode.
112
+
* Otherwise, if it is set to an invalid value, it will crash the whole RIC process.
Copy file name to clipboardExpand all lines: aws-lambda-java-runtime-interface-client/src/main/java/com/amazonaws/services/lambda/runtime/api/client/util/ConcurrencyConfig.java
privatefinalStringINVALID_CONFIG_MESSAGE_PREFIX = String.format("User configured %s is invalid. Please make sure it is a positive number more than zero and less than or equal %d",
if (readNumOfPlatformThreads <= 0 || readNumOfPlatformThreads > AWS_LAMBDA_MAX_CONCURRENCY_LIMIT) {
31
+
if (readNumOfPlatformThreads <1 || readNumOfPlatformThreads > AWS_LAMBDA_MAX_CONCURRENCY_LIMIT) {
31
32
thrownewIllegalArgumentException();
32
33
}
33
34
}
34
35
} catch (Exceptione) {
35
-
readNumOfPlatformThreads = 0;
36
-
Stringmessage = String.format(
37
-
"User configured %s is not valid. Please make sure it is a positive number more than zero and less than or equal %d\n%s\nDefaulting to no concurrency.",
Copy file name to clipboardExpand all lines: aws-lambda-java-runtime-interface-client/src/test/java/com/amazonaws/services/lambda/runtime/api/client/util/ConcurrencyConfigTest.java
0 commit comments