Skip to content

Commit

Permalink
Merge branch 'master' into fjcastanog/SERVER-7194-oficial-hyxtrix-merge
Browse files Browse the repository at this point in the history
  • Loading branch information
romulus85 authored May 7, 2024
2 parents 7c03baf + e1dc839 commit e700d45
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
17 changes: 17 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
plugins {

id "com.netflix.nebula.netflixoss" version "11.3.1"
id "me.champeau.jmh" version "0.7.1"
}

group = "com.netflix"

allprojects {
repositories {
mavenCentral()
Expand All @@ -18,4 +21,18 @@ subprojects {
tasks.withType(Javadoc).configureEach {
failOnError = false
}

publishing {
repositories {
maven {
def releasesRepoUrl = "https://nexusng.tuenti.io/repository/maven-release-private/"
def snapshotsRepoUrl = "https://nexusng.tuenti.io/repository/maven-snapshot-private/"
url = version.toString().contains("SNAPSHOT") ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username = System.getenv "NEXUS_USER"
password = System.getenv "NEXUS_PASS"
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -221,14 +221,21 @@ private void touchConfig() {
}

// In JDK 6, setCorePoolSize and setMaximumPoolSize will execute a lock operation. Avoid them if the pool size is not changed.
if (threadPool.getCorePoolSize() != dynamicCoreSize || (allowSizesToDiverge && threadPool.getMaximumPoolSize() != dynamicMaximumSize)) {
int currentMaxPoolSize = threadPool.getMaximumPoolSize();
if (threadPool.getCorePoolSize() != dynamicCoreSize || (allowSizesToDiverge && currentMaxPoolSize != dynamicMaximumSize)) {
if (maxTooLow) {
logger.error("Hystrix ThreadPool configuration for : " + metrics.getThreadPoolKey().name() + " is trying to set coreSize = " +
dynamicCoreSize + " and maximumSize = " + configuredMaximumSize + ". Maximum size will be set to " +
dynamicMaximumSize + ", the coreSize value, since it must be equal to or greater than the coreSize value");
}
threadPool.setCorePoolSize(dynamicCoreSize);
threadPool.setMaximumPoolSize(dynamicMaximumSize);
// In Java9+ the condition corePoolSize <= maximumPoolSize should be always true
if (dynamicCoreSize > currentMaxPoolSize) {
threadPool.setMaximumPoolSize(dynamicMaximumSize);
threadPool.setCorePoolSize(dynamicCoreSize);
} else {
threadPool.setCorePoolSize(dynamicCoreSize);
threadPool.setMaximumPoolSize(dynamicMaximumSize);
}
}

threadPool.setKeepAliveTime(properties.keepAliveTimeMinutes().get(), TimeUnit.MINUTES);
Expand Down

0 comments on commit e700d45

Please sign in to comment.