From ec52df1a298a7eee905d63dc4f6dd1c21db544ed Mon Sep 17 00:00:00 2001 From: alxkm Date: Wed, 16 Sep 2026 22:27:28 +0200 Subject: [PATCH] Fix missing page index argument in reentrant write lock warning PAGE_LOCKED_TIMES is "Page [{}] had been locked {} times.", but only the write hold count was passed to the logger. SLF4J filled the first placeholder with the count and printed the second one literally, so the warning reported the hold count as the page index and never showed the count itself. Pass page.getPageIndex() as the first argument, matching the neighbouring REENTRANT_WRITE_LOCKS_DETAIL call in the same method. --- .../mtree/impl/pbtree/schemafile/pagemgr/SchemaPageContext.java | 1 + 1 file changed, 1 insertion(+) diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/mtree/impl/pbtree/schemafile/pagemgr/SchemaPageContext.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/mtree/impl/pbtree/schemafile/pagemgr/SchemaPageContext.java index 10f9cb051bd72..498cedaa4934c 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/mtree/impl/pbtree/schemafile/pagemgr/SchemaPageContext.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/mtree/impl/pbtree/schemafile/pagemgr/SchemaPageContext.java @@ -96,6 +96,7 @@ public void traceLock(ISchemaPage page) throws SegmentNotFoundException { if (((ReentrantReadWriteLock) page.getLock()).getWriteHoldCount() > 1) { logger.warn( DataNodeSchemaMessages.PAGE_LOCKED_TIMES, + page.getPageIndex(), ((ReentrantReadWriteLock) page.getLock()).getWriteHoldCount()); // had already been locked twice page.getLock().writeLock().unlock();