diff --git a/Documentation/config-gerrit.txt b/Documentation/config-gerrit.txt index fb0fd8e8c5..2c8b5dd81a 100644 --- a/Documentation/config-gerrit.txt +++ b/Documentation/config-gerrit.txt @@ -720,14 +720,24 @@ See also link:cmd-flush-caches.html[gerrit flush-caches]. ==== [[cache_options]]Cache Options -[[cache.diff_intraline.maxIdleWorkers]]cache.diff_intraline.maxIdleWorkers:: +[[cache.diff.timeout]]cache.diff.timeout:: + -Number of idle worker threads to maintain for the intraline difference -computations. There is no upper bound on how many concurrent requests -can occur at once, if additional threads are started to handle a peak -load, only this many will remain idle afterwards. +Maximum number of milliseconds to wait for diff data before giving up and +falling back on a simpler diff algorithm that will not be able to break down +modified regions into smaller ones. This is a work around for an infinite loop +bug in the default difference algorithm implementation. + -Default is 1.5x number of available CPUs. +Values should use common unit suffixes to express their setting: ++ +* ms, milliseconds +* s, sec, second, seconds +* m, min, minute, minutes +* h, hr, hour, hours + ++ +If a unit suffix is not specified, `milliseconds` is assumed. ++ +Default is 5 seconds. [[cache.diff_intraline.timeout]]cache.diff_intraline.timeout:: + diff --git a/gerrit-pgm/src/main/java/com/google/gerrit/pgm/Daemon.java b/gerrit-pgm/src/main/java/com/google/gerrit/pgm/Daemon.java index 9726f03506..f5133483a6 100644 --- a/gerrit-pgm/src/main/java/com/google/gerrit/pgm/Daemon.java +++ b/gerrit-pgm/src/main/java/com/google/gerrit/pgm/Daemon.java @@ -63,7 +63,7 @@ import com.google.gerrit.server.index.IndexModule.IndexType; import com.google.gerrit.server.mail.SignedTokenEmailTokenVerifier; import com.google.gerrit.server.mail.SmtpEmailSender; import com.google.gerrit.server.mime.MimeUtil2Module; -import com.google.gerrit.server.patch.IntraLineWorkerPool; +import com.google.gerrit.server.patch.DiffExecutorModule; import com.google.gerrit.server.plugins.PluginGuiceEnvironment; import com.google.gerrit.server.plugins.PluginRestApiModule; import com.google.gerrit.server.schema.DataSourceProvider; @@ -320,7 +320,7 @@ public class Daemon extends SiteProgram { modules.add(new WorkQueue.Module()); modules.add(new ChangeHookRunner.Module()); modules.add(new ReceiveCommitsExecutorModule()); - modules.add(new IntraLineWorkerPool.Module()); + modules.add(new DiffExecutorModule()); modules.add(new MimeUtil2Module()); modules.add(cfgInjector.getInstance(GerritGlobalModule.class)); modules.add(new InternalAccountDirectory.Module()); diff --git a/gerrit-pgm/src/main/java/com/google/gerrit/pgm/util/BatchProgramModule.java b/gerrit-pgm/src/main/java/com/google/gerrit/pgm/util/BatchProgramModule.java index b70d915829..23983b769d 100644 --- a/gerrit-pgm/src/main/java/com/google/gerrit/pgm/util/BatchProgramModule.java +++ b/gerrit-pgm/src/main/java/com/google/gerrit/pgm/util/BatchProgramModule.java @@ -47,6 +47,7 @@ import com.google.gerrit.server.git.TagCache; import com.google.gerrit.server.group.GroupModule; import com.google.gerrit.server.mail.ReplacePatchSetSender; import com.google.gerrit.server.notedb.NoteDbModule; +import com.google.gerrit.server.patch.DiffExecutorModule; import com.google.gerrit.server.patch.PatchListCacheImpl; import com.google.gerrit.server.project.ChangeControl; import com.google.gerrit.server.project.CommentLinkInfo; @@ -84,6 +85,7 @@ public class BatchProgramModule extends FactoryModule { @Override protected void configure() { install(reviewDbModule); + install(new DiffExecutorModule()); install(PatchListCacheImpl.module()); // Plugins are not loaded and we're just running through each change // once, so don't worry about cache removal. diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/patch/DiffExecutor.java b/gerrit-server/src/main/java/com/google/gerrit/server/patch/DiffExecutor.java new file mode 100644 index 0000000000..564ca58453 --- /dev/null +++ b/gerrit-server/src/main/java/com/google/gerrit/server/patch/DiffExecutor.java @@ -0,0 +1,31 @@ +// Copyright (C) 2015 The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package com.google.gerrit.server.patch; + +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +import com.google.inject.BindingAnnotation; + +import java.lang.annotation.Retention; +import java.util.concurrent.ExecutorService; + +/** + * Marker on {@link ExecutorService} used by + * {@link IntraLineLoader} and {@link PatchListLoader}. + */ +@Retention(RUNTIME) +@BindingAnnotation +public @interface DiffExecutor { +} diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/patch/DiffExecutorModule.java b/gerrit-server/src/main/java/com/google/gerrit/server/patch/DiffExecutorModule.java new file mode 100644 index 0000000000..9eaea3a62f --- /dev/null +++ b/gerrit-server/src/main/java/com/google/gerrit/server/patch/DiffExecutorModule.java @@ -0,0 +1,39 @@ +// Copyright (C) 2015 The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package com.google.gerrit.server.patch; + +import com.google.common.util.concurrent.ThreadFactoryBuilder; +import com.google.inject.AbstractModule; +import com.google.inject.Provides; +import com.google.inject.Singleton; + +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; + +/** Module providing the {@link DiffExecutor}. */ +public class DiffExecutorModule extends AbstractModule { + + @Override + protected void configure() { + } + + @Provides + @Singleton + @DiffExecutor + public ExecutorService createDiffExecutor() { + return Executors.newCachedThreadPool(new ThreadFactoryBuilder() + .setNameFormat("Diff-%d").setDaemon(true).build()); + } +} diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/patch/IntraLineLoader.java b/gerrit-server/src/main/java/com/google/gerrit/server/patch/IntraLineLoader.java index dd67c20e90..ffcce14654 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/patch/IntraLineLoader.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/patch/IntraLineLoader.java @@ -15,6 +15,7 @@ package com.google.gerrit.server.patch; +import com.google.common.base.Throwables; import com.google.common.cache.CacheLoader; import com.google.gerrit.server.config.ConfigUtil; import com.google.gerrit.server.config.GerritServerConfig; @@ -29,7 +30,12 @@ import org.slf4j.LoggerFactory; import java.util.ArrayList; import java.util.List; +import java.util.concurrent.Callable; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; import java.util.regex.Pattern; class IntraLineLoader extends CacheLoader { @@ -41,12 +47,13 @@ class IntraLineLoader extends CacheLoader { private static final Pattern CONTROL_BLOCK_START_RE = Pattern .compile("[{:][ \\t]*$"); - private final IntraLineWorkerPool workerPool; + private final ExecutorService diffExecutor; private final long timeoutMillis; @Inject - IntraLineLoader(IntraLineWorkerPool pool, @GerritServerConfig Config cfg) { - workerPool = pool; + IntraLineLoader(@DiffExecutor ExecutorService diffExecutor, + @GerritServerConfig Config cfg) { + this.diffExecutor = diffExecutor; timeoutMillis = ConfigUtil.getTimeUnit(cfg, "cache", PatchListCacheImpl.INTRA_NAME, "timeout", TimeUnit.MILLISECONDS.convert(5, TimeUnit.SECONDS), @@ -54,27 +61,30 @@ class IntraLineLoader extends CacheLoader { } @Override - public IntraLineDiff load(IntraLineDiffKey key) throws Exception { - IntraLineWorkerPool.Worker w = workerPool.acquire(); - IntraLineWorkerPool.Worker.Result r = w.computeWithTimeout(key, timeoutMillis); - - if (r == IntraLineWorkerPool.Worker.Result.TIMEOUT) { - // Don't keep this thread. We have to murder it unsafely, which - // means its unable to be reused in the future. Return back a - // null result, indicating the cache cannot load this key. - // + public IntraLineDiff load(final IntraLineDiffKey key) throws Exception { + Future result = diffExecutor.submit(new Callable() { + @Override + public IntraLineDiff call() throws Exception { + return IntraLineLoader.compute(key); + } + }); + try { + return result.get(timeoutMillis, TimeUnit.MILLISECONDS); + } catch (InterruptedException | TimeoutException e) { + log.warn(timeoutMillis + " ms timeout reached for IntraLineDiff" + + " in project " + key.getProject().get() + + " on commit " + key.getCommit().name() + + " for path " + key.getPath() + + " comparing " + key.getBlobA().name() + + ".." + key.getBlobB().name()); + result.cancel(true); return new IntraLineDiff(IntraLineDiff.Status.TIMEOUT); - } - workerPool.release(w); - - if (r.error != null) { + } catch (ExecutionException e) { // If there was an error computing the result, carry it // up to the caller so the cache knows this key is invalid. - // - throw r.error; + Throwables.propagateIfInstanceOf(e.getCause(), Exception.class); + throw new Exception(e.getMessage(), e.getCause()); } - - return r.diff; } static IntraLineDiff compute(IntraLineDiffKey key) throws Exception { diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/patch/IntraLineWorkerPool.java b/gerrit-server/src/main/java/com/google/gerrit/server/patch/IntraLineWorkerPool.java deleted file mode 100644 index 49ae9503ac..0000000000 --- a/gerrit-server/src/main/java/com/google/gerrit/server/patch/IntraLineWorkerPool.java +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright (C) 2009 The Android Open Source Project -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -package com.google.gerrit.server.patch; - -import static com.google.gerrit.server.patch.IntraLineLoader.log; - -import com.google.gerrit.server.config.GerritServerConfig; -import com.google.inject.AbstractModule; -import com.google.inject.Inject; -import com.google.inject.Singleton; - -import org.eclipse.jgit.lib.Config; - -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; - -@Singleton -public class IntraLineWorkerPool { - public static class Module extends AbstractModule { - @Override - protected void configure() { - bind(IntraLineWorkerPool.class); - } - } - - private final BlockingQueue workerPool; - - @Inject - public IntraLineWorkerPool(@GerritServerConfig Config cfg) { - int workers = cfg.getInt( - "cache", PatchListCacheImpl.INTRA_NAME, "maxIdleWorkers", - Runtime.getRuntime().availableProcessors() * 3 / 2); - workerPool = new ArrayBlockingQueue<>(workers, true /* fair */); - } - - Worker acquire() { - Worker w = workerPool.poll(); - if (w == null) { - // If no worker is immediately available, start a new one. - // Maximum parallelism is controlled by the web server. - w = new Worker(); - w.start(); - } - return w; - } - - void release(Worker w) { - if (!workerPool.offer(w)) { - // If the idle worker pool is full, terminate the worker. - w.shutdownGracefully(); - } - } - - static class Worker extends Thread { - private static final AtomicInteger count = new AtomicInteger(1); - - private final ArrayBlockingQueue input; - private final ArrayBlockingQueue result; - - Worker() { - input = new ArrayBlockingQueue<>(1); - result = new ArrayBlockingQueue<>(1); - - setName("IntraLineDiff-" + count.getAndIncrement()); - setDaemon(true); - } - - Result computeWithTimeout(IntraLineDiffKey key, long timeoutMillis) - throws Exception { - if (!input.offer(new Input(key))) { - log.error("Cannot enqueue task to thread " + getName()); - return Result.TIMEOUT; - } - - Result r = result.poll(timeoutMillis, TimeUnit.MILLISECONDS); - if (r != null) { - return r; - } else { - log.warn(timeoutMillis + " ms timeout reached for IntraLineDiff" - + " in project " + key.getProject().get() - + " on commit " + key.getCommit().name() - + " for path " + key.getPath() - + " comparing " + key.getBlobA().name() - + ".." + key.getBlobB().name() - + ". Killing " + getName()); - forcefullyKillThreadInAnUglyWay(); - return Result.TIMEOUT; - } - } - - @SuppressWarnings("deprecation") - private void forcefullyKillThreadInAnUglyWay() { - try { - stop(); - } catch (Throwable error) { - // Ignore any reason the thread won't stop. - log.error("Cannot stop runaway thread " + getName(), error); - } - } - - private void shutdownGracefully() { - if (!input.offer(Input.END_THREAD)) { - log.error("Cannot gracefully stop thread " + getName()); - } - } - - @Override - public void run() { - try { - for (;;) { - Input in; - try { - in = input.take(); - } catch (InterruptedException e) { - log.error("Unexpected interrupt on " + getName()); - continue; - } - - if (in == Input.END_THREAD) { - return; - } - - Result r; - try { - r = new Result(IntraLineLoader.compute(in.key)); - } catch (Exception error) { - r = new Result(error); - } - - if (!result.offer(r)) { - log.error("Cannot return result from " + getName()); - } - } - } catch (ThreadDeath iHaveBeenShot) { - // Handle thread death by gracefully returning to the caller, - // allowing the thread to be destroyed. - } - } - - private static class Input { - static final Input END_THREAD = new Input(null); - - final IntraLineDiffKey key; - - Input(IntraLineDiffKey key) { - this.key = key; - } - } - - static class Result { - static final Result TIMEOUT = new Result((IntraLineDiff) null); - - final IntraLineDiff diff; - final Exception error; - - Result(IntraLineDiff diff) { - this.diff = diff; - this.error = null; - } - - Result(Exception error) { - this.diff = null; - this.error = error; - } - } - } -} diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/patch/PatchListCacheImpl.java b/gerrit-server/src/main/java/com/google/gerrit/server/patch/PatchListCacheImpl.java index 7b7c73108a..6c769f742a 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/patch/PatchListCacheImpl.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/patch/PatchListCacheImpl.java @@ -35,7 +35,7 @@ import java.util.concurrent.ExecutionException; /** Provides a cached list of {@link PatchListEntry}. */ @Singleton public class PatchListCacheImpl implements PatchListCache { - private static final String FILE_NAME = "diff"; + static final String FILE_NAME = "diff"; static final String INTRA_NAME = "diff_intraline"; public static Module module() { diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/patch/PatchListLoader.java b/gerrit-server/src/main/java/com/google/gerrit/server/patch/PatchListLoader.java index 0c8c5ecac1..74c5bbe77f 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/patch/PatchListLoader.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/patch/PatchListLoader.java @@ -16,11 +16,13 @@ package com.google.gerrit.server.patch; import com.google.common.base.Function; +import com.google.common.base.Throwables; import com.google.common.cache.CacheLoader; import com.google.common.collect.FluentIterable; import com.google.gerrit.reviewdb.client.AccountDiffPreference.Whitespace; import com.google.gerrit.reviewdb.client.Patch; import com.google.gerrit.reviewdb.client.RefNames; +import com.google.gerrit.server.config.ConfigUtil; import com.google.gerrit.server.config.GerritServerConfig; import com.google.gerrit.server.git.GitRepositoryManager; import com.google.gerrit.server.git.MergeUtil; @@ -69,6 +71,12 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; +import java.util.concurrent.Callable; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Future; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; public class PatchListLoader extends CacheLoader { static final Logger log = LoggerFactory.getLogger(PatchListLoader.class); @@ -76,13 +84,22 @@ public class PatchListLoader extends CacheLoader { private final GitRepositoryManager repoManager; private final PatchListCache patchListCache; private final ThreeWayMergeStrategy mergeStrategy; + private final ExecutorService diffExecutor; + private final long timeoutMillis; @Inject - PatchListLoader(GitRepositoryManager mgr, PatchListCache plc, - @GerritServerConfig Config cfg) { + PatchListLoader(GitRepositoryManager mgr, + PatchListCache plc, + @GerritServerConfig Config cfg, + @DiffExecutor ExecutorService de) { repoManager = mgr; patchListCache = plc; mergeStrategy = MergeUtil.getMergeStrategy(cfg); + diffExecutor = de; + timeoutMillis = + ConfigUtil.getTimeUnit(cfg, "cache", PatchListCacheImpl.FILE_NAME, + "timeout", TimeUnit.MILLISECONDS.convert(5, TimeUnit.SECONDS), + TimeUnit.MILLISECONDS); } @Override @@ -164,7 +181,7 @@ public class PatchListLoader extends CacheLoader { DiffEntry diffEntry = diffEntries.get(i); if (paths == null || paths.contains(diffEntry.getNewPath()) || paths.contains(diffEntry.getOldPath())) { - FileHeader fh = df.toFileHeader(diffEntry); + FileHeader fh = toFileHeader(key, df, diffEntry); entries.add(newEntry(aTree, fh)); } } @@ -175,6 +192,44 @@ public class PatchListLoader extends CacheLoader { } } + private FileHeader toFileHeader(PatchListKey key, + final DiffFormatter diffFormatter, final DiffEntry diffEntry) + throws IOException { + + Future result = diffExecutor.submit(new Callable() { + @Override + public FileHeader call() throws IOException { + return diffFormatter.toFileHeader(diffEntry); + } + }); + + try { + return result.get(timeoutMillis, TimeUnit.MILLISECONDS); + } catch (InterruptedException | TimeoutException e) { + log.warn(timeoutMillis + " ms timeout reached for Diff loader" + + " in project " + key.projectKey.get() + + " on commit " + key.getNewId().name() + + " on path " + diffEntry.getNewPath() + + " comparing " + diffEntry.getOldId().name() + + ".." + diffEntry.getNewId().name()); + result.cancel(true); + return toFileHeaderWithoutMyersDiff(diffFormatter, diffEntry); + } catch (ExecutionException e) { + // If there was an error computing the result, carry it + // up to the caller so the cache knows this key is invalid. + Throwables.propagateIfInstanceOf(e.getCause(), IOException.class); + throw new IOException(e.getMessage(), e.getCause()); + } + } + + private FileHeader toFileHeaderWithoutMyersDiff(DiffFormatter diffFormatter, + DiffEntry diffEntry) throws IOException { + HistogramDiff histogramDiff = new HistogramDiff(); + histogramDiff.setFallbackAlgorithm(null); + diffFormatter.setDiffAlgorithm(histogramDiff); + return diffFormatter.toFileHeader(diffEntry); + } + private PatchListEntry newCommitMessage(final RawTextComparator cmp, final ObjectReader reader, final RevCommit aCommit, final RevCommit bCommit) throws IOException { diff --git a/gerrit-server/src/test/java/com/google/gerrit/testutil/InMemoryModule.java b/gerrit-server/src/test/java/com/google/gerrit/testutil/InMemoryModule.java index 72495b3d6c..fc74c207db 100644 --- a/gerrit-server/src/test/java/com/google/gerrit/testutil/InMemoryModule.java +++ b/gerrit-server/src/test/java/com/google/gerrit/testutil/InMemoryModule.java @@ -18,6 +18,7 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.inject.Scopes.SINGLETON; import com.google.common.net.InetAddresses; +import com.google.common.util.concurrent.MoreExecutors; import com.google.gerrit.common.ChangeHooks; import com.google.gerrit.common.DisabledChangeHooks; import com.google.gerrit.reviewdb.client.AuthType; @@ -48,6 +49,7 @@ import com.google.gerrit.server.index.ChangeSchemas; import com.google.gerrit.server.index.IndexModule.IndexType; import com.google.gerrit.server.mail.SignedTokenEmailTokenVerifier; import com.google.gerrit.server.mail.SmtpEmailSender; +import com.google.gerrit.server.patch.DiffExecutor; import com.google.gerrit.server.schema.DataSourceType; import com.google.gerrit.server.schema.SchemaCreator; import com.google.gerrit.server.securestore.DefaultSecureStore; @@ -74,6 +76,7 @@ import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.net.InetSocketAddress; import java.net.SocketAddress; +import java.util.concurrent.ExecutorService; public class InMemoryModule extends FactoryModule { public static Config newDefaultConfig() { @@ -160,6 +163,18 @@ public class InMemoryModule extends FactoryModule { return CanonicalWebUrlProvider.class; } }); + //Replacement of DiffExecutorModule to not use thread pool in the tests + install(new AbstractModule() { + @Override + protected void configure() { + } + @Provides + @Singleton + @DiffExecutor + public ExecutorService createDiffExecutor() { + return MoreExecutors.newDirectExecutorService(); + } + }); install(new DefaultCacheFactory.Module()); install(new SmtpEmailSender.Module()); install(new SignedTokenEmailTokenVerifier.Module()); diff --git a/gerrit-war/src/main/java/com/google/gerrit/httpd/WebAppInitializer.java b/gerrit-war/src/main/java/com/google/gerrit/httpd/WebAppInitializer.java index f0ad01dccd..a0728e9acd 100644 --- a/gerrit-war/src/main/java/com/google/gerrit/httpd/WebAppInitializer.java +++ b/gerrit-war/src/main/java/com/google/gerrit/httpd/WebAppInitializer.java @@ -47,7 +47,7 @@ import com.google.gerrit.server.index.IndexModule; import com.google.gerrit.server.mail.SignedTokenEmailTokenVerifier; import com.google.gerrit.server.mail.SmtpEmailSender; import com.google.gerrit.server.mime.MimeUtil2Module; -import com.google.gerrit.server.patch.IntraLineWorkerPool; +import com.google.gerrit.server.patch.DiffExecutorModule; import com.google.gerrit.server.plugins.PluginGuiceEnvironment; import com.google.gerrit.server.plugins.PluginRestApiModule; import com.google.gerrit.server.schema.DataSourceModule; @@ -286,7 +286,7 @@ public class WebAppInitializer extends GuiceServletContextListener modules.add(new WorkQueue.Module()); modules.add(new ChangeHookRunner.Module()); modules.add(new ReceiveCommitsExecutorModule()); - modules.add(new IntraLineWorkerPool.Module()); + modules.add(new DiffExecutorModule()); modules.add(new MimeUtil2Module()); modules.add(cfgInjector.getInstance(GerritGlobalModule.class)); modules.add(new InternalAccountDirectory.Module()); diff --git a/lib/jgit/BUCK b/lib/jgit/BUCK index 8b2088c539..a658fc36e7 100644 --- a/lib/jgit/BUCK +++ b/lib/jgit/BUCK @@ -1,13 +1,13 @@ include_defs('//lib/maven.defs') REPO = GERRIT # Leave here even if set to MAVEN_CENTRAL. -VERS = '3.6.2.201501210735-r.40-g23ad3a3' +VERS = '3.7.0.201502260915-r.58-g65c379e' maven_jar( name = 'jgit', id = 'org.eclipse.jgit:org.eclipse.jgit:' + VERS, - bin_sha1 = '849c10fec9a9af15f57651b99a5cf6de6bd3077c', - src_sha1 = '6fa857df4b73bf2fa222d3ad272e99e3c929453f', + bin_sha1 = '8fc9620ec499169facad3355f7417eb6a8aff511', + src_sha1 = '40bd9ae8af8e0b03eb4e43f44f5feda8b7325221', license = 'jgit', repository = REPO, unsign = True, @@ -22,7 +22,7 @@ maven_jar( maven_jar( name = 'jgit-servlet', id = 'org.eclipse.jgit:org.eclipse.jgit.http.server:' + VERS, - sha1 = 'f4a2252fac9258479394a3be3318f88fc8a538e8', + sha1 = 'cecc2b9c0b94455348c3a0c63eb83f72cc595757', license = 'jgit', repository = REPO, deps = [':jgit'], @@ -36,7 +36,7 @@ maven_jar( maven_jar( name = 'jgit-archive', id = 'org.eclipse.jgit:org.eclipse.jgit.archive:' + VERS, - sha1 = 'bb1cf790a4ca6760f99b1d86ad5d25857bf69dc2', + sha1 = '7ccc7c78bf47566045ea7a3c08508ba18e4684ca', license = 'jgit', repository = REPO, deps = [':jgit', @@ -53,7 +53,7 @@ maven_jar( maven_jar( name = 'junit', id = 'org.eclipse.jgit:org.eclipse.jgit.junit:' + VERS, - sha1 = '9b9f2da56aacde9e58f905becc4780b4d64ee79e', + sha1 = '87d64d722447dc3971ace30d2a72593c72a4d05f', license = 'DO_NOT_DISTRIBUTE', repository = REPO, unsign = True,