From c76848e2af891f78e6b8cf6b0068c0a9c60ff776 Mon Sep 17 00:00:00 2001 From: Lihui Hu Date: Wed, 22 May 2024 13:44:20 -0400 Subject: [PATCH] update logs for testing --- .../AbstractLegacyTextSearchGsrsEntityController.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gsrs-spring-boot-autoconfigure/src/main/java/gsrs/controller/AbstractLegacyTextSearchGsrsEntityController.java b/gsrs-spring-boot-autoconfigure/src/main/java/gsrs/controller/AbstractLegacyTextSearchGsrsEntityController.java index 3a118877..32147943 100644 --- a/gsrs-spring-boot-autoconfigure/src/main/java/gsrs/controller/AbstractLegacyTextSearchGsrsEntityController.java +++ b/gsrs-spring-boot-autoconfigure/src/main/java/gsrs/controller/AbstractLegacyTextSearchGsrsEntityController.java @@ -624,20 +624,20 @@ class DiffJsonOutput{ @PostGsrsRestApiMapping(value = "/@databaseIndexSync", apiVersions = 1) public ResponseEntity syncIndexesWithDatabase() throws JsonMappingException, JsonProcessingException{ - log.info("in syncIndexesWithDatabase"); + log.error("in syncIndexesWithDatabase"); List keysInDatabase = getKeys(); List keysInIndex = searchEntityInIndex(); Set extraInDatabase = Sets.difference(new HashSet(keysInDatabase), new HashSet(keysInIndex)); if(extraInDatabase.isEmpty()) { - log.info("Database and index sync: No different items."); + log.error("in syncIndexesWithDatabase: Database and index sync: No different items."); ObjectNode resultNode = JsonNodeFactory.instance.objectNode(); resultNode.put("message", "The entity index is in sync with the database. No reindexing needed."); return new ResponseEntity<>(resultNode, HttpStatus.OK); }else { List list = extraInDatabase.stream().map(format->format.getIdString()).collect(Collectors.toList()); - log.info("Database and index sync: found " + list.size() + " different items."); + log.error("in syncIndexesWithDatabase: Database and index sync: found " + list.size() + " different items."); return new ResponseEntity<>(bulkReindexListOfIDs(list, false), HttpStatus.OK); } }