This is an automated email from the ASF dual-hosted git repository. joerghoh pushed a commit to branch SLING-13112 in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-distribution-journal.git
commit 3b6bd31d965478d4511767054fbe74568a4717c0 Author: Joerg Hoh <[email protected]> AuthorDate: Fri Feb 13 09:28:11 2026 +0100 SLING-13112 add current package ID to the thread name --- .../org/apache/sling/distribution/journal/bookkeeper/BookKeeper.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/org/apache/sling/distribution/journal/bookkeeper/BookKeeper.java b/src/main/java/org/apache/sling/distribution/journal/bookkeeper/BookKeeper.java index 0e5d14b..e9f97ac 100644 --- a/src/main/java/org/apache/sling/distribution/journal/bookkeeper/BookKeeper.java +++ b/src/main/java/org/apache/sling/distribution/journal/bookkeeper/BookKeeper.java @@ -154,6 +154,8 @@ public class BookKeeper { */ public void importPackage(PackageMessage pkgMsg, long offset, Date createdTime, Date importStartTime) throws DistributionException { log.debug("Importing distribution package {} at offset={}", pkgMsg, offset); + String threadNameOrig = Thread.currentThread().getName(); + Thread.currentThread().setName(threadNameOrig + " (" + pkgMsg.getPkgId() + ")"); try (Timer.Context context = subscriberMetrics.getImportedPackageDuration().time(); ResourceResolver importerResolver = getServiceResolver(SUBSERVICE_IMPORTER)) { // Execute the pre-processor @@ -182,6 +184,7 @@ public class BookKeeper { failure(pkgMsg, offset, createdTime, e); } finally { subscriberMetrics.clearCurrentImport(); + Thread.currentThread().setName(threadNameOrig); } }
