Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ public void updateItemDatesMetadata(Context context, Item item) throws SQLExcept
itemService.getMetadata(item, "local", "approximateDate", "issued", Item.ANY, false);

if (CollectionUtils.isEmpty(approximatedDates) || StringUtils.isBlank(approximatedDates.get(0).getValue())) {
log.warn("Cannot update item dates metadata because the approximate date is empty.");
log.debug("Cannot update item dates metadata because the approximate date is empty.");
return;
Comment on lines 229 to 231
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that this is DEBUG-only, the message becomes less actionable because it doesn't identify which Item is being processed. Consider including the item UUID/ID (and possibly the metadata field name) in the log message so that enabling DEBUG helps pinpoint the problematic record without additional instrumentation.

Copilot uses AI. Check for mistakes.
}

Expand Down
4 changes: 2 additions & 2 deletions dspace-api/src/main/java/org/dspace/core/Context.java
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ protected void init() {
"Check previous entries in the dspace.log to find why the db failed to initialize.");
} else {
if (isTransactionAlive()) {
log.warn("Initializing a context while an active transaction exists. Context with hash: {}.",
getHash());
log.debug("Initializing a context while an active transaction exists. Context with hash: {}.",
getHash());
Comment on lines +190 to +191
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This log is triggered when isTransactionAlive() is true during Context initialization, which can indicate an already-open transaction in the current thread (often a sign of an unclosed Context/transaction leak). Dropping this from WARN to DEBUG may make it much harder to detect these issues in production. Consider keeping it at WARN (or at least INFO), or adding more diagnostic detail (e.g., include current thread/request info or an optional stacktrace when debug is enabled) so it remains actionable when it occurs.

Copilot uses AI. Check for mistakes.
}
}
}
Expand Down