diff --git a/projects/saturn/src/main/java/io/fairspace/saturn/rdf/SaturnDatasetFactory.java b/projects/saturn/src/main/java/io/fairspace/saturn/rdf/SaturnDatasetFactory.java index b017f8025..7b50f5f13 100644 --- a/projects/saturn/src/main/java/io/fairspace/saturn/rdf/SaturnDatasetFactory.java +++ b/projects/saturn/src/main/java/io/fairspace/saturn/rdf/SaturnDatasetFactory.java @@ -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); } diff --git a/projects/saturn/src/main/java/io/fairspace/saturn/services/maintenance/MaintenanceService.java b/projects/saturn/src/main/java/io/fairspace/saturn/services/maintenance/MaintenanceService.java index 437ca51dd..d0321de95 100644 --- a/projects/saturn/src/main/java/io/fairspace/saturn/services/maintenance/MaintenanceService.java +++ b/projects/saturn/src/main/java/io/fairspace/saturn/services/maintenance/MaintenanceService.java @@ -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<>()); @@ -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); } @@ -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); } @@ -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);