Skip to content

Commit b7d48c5

Browse files
author
Vladimir Kotal
committed
rename executor
1 parent e3f6c4b commit b7d48c5

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

opengrok-indexer/src/main/java/org/opengrok/indexer/history/FileHistoryCache.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ public void storeRenamed(Set<String> renamedFiles, Repository repository, String
521521
final CountDownLatch latch = new CountDownLatch(renamedFiles.size());
522522
AtomicInteger renamedFileHistoryCount = new AtomicInteger();
523523
for (final String file : renamedFiles) {
524-
env.getIndexerParallelizer().getHistoryRenamedExecutor().submit(() -> {
524+
env.getIndexerParallelizer().getHistoryFileExecutor().submit(() -> {
525525
try {
526526
doRenamedFileHistory(file,
527527
new File(env.getSourceRootPath() + file),

opengrok-indexer/src/main/java/org/opengrok/indexer/index/IndexerParallelizer.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public class IndexerParallelizer implements AutoCloseable {
5959
private LazilyInstantiate<ObjectPool<Ctags>> lzCtagsPool;
6060
private LazilyInstantiate<ExecutorService> lzFixedExecutor;
6161
private LazilyInstantiate<ExecutorService> lzHistoryExecutor;
62-
private LazilyInstantiate<ExecutorService> lzHistoryRenamedExecutor;
62+
private LazilyInstantiate<ExecutorService> lzHistoryFileExecutor;
6363
private LazilyInstantiate<ExecutorService> lzCtagsWatcherExecutor;
6464

6565
/**
@@ -108,17 +108,17 @@ public ObjectPool<Ctags> getCtagsPool() {
108108
}
109109

110110
/**
111-
* @return the ExecutorService used for history parallelism
111+
* @return the ExecutorService used for history parallelism (repository level)
112112
*/
113113
public ExecutorService getHistoryExecutor() {
114114
return lzHistoryExecutor.get();
115115
}
116116

117117
/**
118-
* @return the ExecutorService used for history-renamed parallelism
118+
* @return the ExecutorService used for history parallelism (file level)
119119
*/
120-
public ExecutorService getHistoryRenamedExecutor() {
121-
return lzHistoryRenamedExecutor.get();
120+
public ExecutorService getHistoryFileExecutor() {
121+
return lzHistoryFileExecutor.get();
122122
}
123123

124124
/**
@@ -195,8 +195,8 @@ private void bounceHistoryExecutor() {
195195
}
196196

197197
private void bounceHistoryRenamedExecutor() {
198-
if (lzHistoryRenamedExecutor.isActive()) {
199-
ExecutorService formerHistoryRenamedExecutor = lzHistoryRenamedExecutor.get();
198+
if (lzHistoryFileExecutor.isActive()) {
199+
ExecutorService formerHistoryRenamedExecutor = lzHistoryFileExecutor.get();
200200
createLazyHistoryRenamedExecutor();
201201
formerHistoryRenamedExecutor.shutdown();
202202
}
@@ -241,7 +241,7 @@ private void createLazyHistoryExecutor() {
241241
}
242242

243243
private void createLazyHistoryRenamedExecutor() {
244-
lzHistoryRenamedExecutor = LazilyInstantiate.using(() ->
244+
lzHistoryFileExecutor = LazilyInstantiate.using(() ->
245245
Executors.newFixedThreadPool(env.getHistoryRenamedParallelism()));
246246
}
247247

0 commit comments

Comments
 (0)