Skip to content

Commit

Permalink
Cleanup and PR comment resolves
Browse files Browse the repository at this point in the history
  • Loading branch information
frankyhollywood committed Jul 10, 2024
1 parent 1edafd3 commit d6e7463
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public static Dataset connect(Config.Jena config, ViewStoreClientFactory viewSto
}

if (restoreNeeded) {
log.warn("Jena restore is needed, starting automatic restore.");
restore(dsg, txnLog);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
@Log4j2
public class MaintenanceService {
public static final String SERVICE_NOT_AVAILABLE = "Service not available";
public static final String REINDEXING_IS_ALREADY_IN_PROGRESS = "Reindexing is already in progress.";
public static final String REINDEXING_IS_ALREADY_IN_PROGRESS = "Maintenance is already in progress.";

private final ThreadPoolExecutor threadpool =
new ThreadPoolExecutor(1, 1, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<>());
Expand Down Expand Up @@ -64,7 +64,7 @@ public synchronized void startRecreateIndexTask() {
throw new NotAvailableException(SERVICE_NOT_AVAILABLE);
}
if (active()) {
log.info("Maintenance is already in progress.");
log.info(REINDEXING_IS_ALREADY_IN_PROGRESS);
throw new ConflictException(REINDEXING_IS_ALREADY_IN_PROGRESS);
}

Expand All @@ -80,11 +80,8 @@ public void compactRdfStorageTask() {
if (!userService.currentUser().isAdmin()) {
throw new AccessDeniedException();
}
if (disabled()) {
throw new NotAvailableException(SERVICE_NOT_AVAILABLE);
}
if (active()) {
log.info("Reindexing is already in progress.");
log.info(REINDEXING_IS_ALREADY_IN_PROGRESS);
throw new ConflictException(REINDEXING_IS_ALREADY_IN_PROGRESS);
}

Expand All @@ -93,7 +90,7 @@ public void compactRdfStorageTask() {
try {
var ds = unwrap(dataset.asDatasetGraph());
if (ds == null) {
log.info("Compacting RDF storage is not supported for this storage type");
log.warn("Compacting RDF storage is not supported for this storage type");
return;
}
DatabaseMgr.compact(ds, true);
Expand Down

0 comments on commit d6e7463

Please sign in to comment.