Skip to content

Commit de94720

Browse files
committed
Remove schedExecutor after reversions. Add log message.
1 parent ed29753 commit de94720

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

src/org/opensolaris/opengrok/index/IndexDatabase.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ public void update(IndexerParallelizer parallelizer)
441441
}
442442
}
443443

444-
// The actual indexing happens in indexDown().
444+
// The actual indexing happens in indexParallel().
445445

446446
IndexDownArgs args = new IndexDownArgs();
447447
args.est_total = getFileCount(sourceRoot, dir);
@@ -1012,6 +1012,7 @@ private void indexParallel(IndexDownArgs args) throws IOException {
10121012
} catch (InterruptedException e) {
10131013
// Allow one retry if interrupted
10141014
if (++tries <= 1) continue;
1015+
LOGGER.log(Level.WARNING, "No retry: {0}", x.file);
10151016
x.exception = e;
10161017
ret = false;
10171018
} catch (RuntimeException|IOException e) {

src/org/opensolaris/opengrok/index/IndexerParallelizer.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
import java.util.concurrent.ExecutorService;
2727
import java.util.concurrent.Executors;
2828
import java.util.concurrent.ForkJoinPool;
29-
import java.util.concurrent.ScheduledThreadPoolExecutor;
3029
import java.util.logging.Logger;
3130
import org.opensolaris.opengrok.analysis.Ctags;
3231
import org.opensolaris.opengrok.analysis.CtagsValidator;
@@ -47,14 +46,11 @@
4746
*/
4847
public class IndexerParallelizer implements AutoCloseable {
4948

50-
private static final int SCHED_THREAD_NUM = 2;
51-
5249
private static final Logger LOGGER =
5350
LoggerFactory.getLogger(IndexerParallelizer.class);
5451

5552
private final ExecutorService fixedExecutor;
5653
private final ForkJoinPool forkJoinPool;
57-
private final ScheduledThreadPoolExecutor schedExecutor;
5854
private final ObjectPool<Ctags> ctagsPool;
5955

6056
/**
@@ -69,7 +65,6 @@ public IndexerParallelizer(RuntimeEnvironment env) {
6965
// The order of the following is important.
7066
this.fixedExecutor = Executors.newFixedThreadPool(indexingParallelism);
7167
this.forkJoinPool = new ForkJoinPool(indexingParallelism);
72-
this.schedExecutor = new ScheduledThreadPoolExecutor(SCHED_THREAD_NUM);
7368
this.ctagsPool = new BoundedBlockingObjectPool<>(indexingParallelism,
7469
new CtagsValidator(), new CtagsObjectFactory(env));
7570
}
@@ -98,7 +93,6 @@ public ObjectPool<Ctags> getCtagsPool() {
9893
@Override
9994
public void close() throws Exception {
10095
if (ctagsPool != null) ctagsPool.shutdown();
101-
if (schedExecutor != null) schedExecutor.shutdown();
10296
if (forkJoinPool != null) forkJoinPool.shutdown();
10397
if (fixedExecutor != null) fixedExecutor.shutdown();
10498
}

0 commit comments

Comments
 (0)