提交 7c253c1c 编写于 作者: J Jesse Glick

[JENKINS-17667] Reverting commit e3952f41.

上级 767451cf
......@@ -70,9 +70,6 @@ Upcoming changes</a>
<li class="bug">
Word-break links in build logs to preserve page width
(<a href="https://github.com/jenkinsci/jenkins/pull/1308">pull 1308</a>)
<li class="bug">
Synchronization issue during tool installation
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-17667">issue 17667</a>)
<li class="bug">
Log rotation fails with "...looks to have already been deleted"
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-22395">issue 22395</a>)
......
......@@ -50,22 +50,16 @@ public class InstallerTranslator extends ToolLocationTranslator {
if (isp == null) {
return null;
}
for (ToolInstaller installer : isp.installers) {
if (installer.appliesTo(node)) {
Map<ToolInstallation, Semaphore> mutexByTool;
Semaphore semaphore;
synchronized(mutexByNode) {
mutexByTool = mutexByNode.get(node);
if (mutexByTool == null) {
mutexByNode.put(node, mutexByTool = new WeakHashMap<ToolInstallation, Semaphore>());
mutexByTool.put(tool, semaphore = new Semaphore(1));
} else {
semaphore = mutexByTool.get(tool);
}
Map<ToolInstallation, Semaphore> mutexByTool = mutexByNode.get(node);
if (mutexByTool == null) {
mutexByNode.put(node, mutexByTool = new WeakHashMap<ToolInstallation, Semaphore>());
}
Semaphore semaphore = mutexByTool.get(tool);
if (semaphore == null) {
mutexByTool.put(tool, semaphore = new Semaphore(1));
}
semaphore.acquire();
try {
return installer.performInstallation(tool, node, log).getRemote();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册