nodece commented on code in PR #25536:
URL: https://github.com/apache/pulsar/pull/25536#discussion_r3091436045


##########
pulsar-broker/src/test/java/org/apache/pulsar/client/api/SimpleProducerConsumerTest.java:
##########
@@ -5021,11 +5034,11 @@ public void onSendAcknowledgement(Producer producer, 
Message message, MessageId
             // Create message payload, refCnf = 1 now.
             ByteBuf payload = PulsarByteBufAllocator.DEFAULT.heapBuffer(1);
             payloads[i] = payload;
-            log.info("payload_{}.refCnf 1st: {}", i,  payload.refCnt());
+            log.info().attr("payload", i).attr("st", 
payload.refCnt()).log("payload_ .refCnf 1st");

Review Comment:
   ```suggestion
               log.info().attr("payloadIndex", i).attr("refCnt", 
payload.refCnt()).log("Payload refCnt at first check“);
   ```



##########
pulsar-broker/src/test/java/org/apache/pulsar/client/api/SimpleProducerConsumerTest.java:
##########
@@ -5021,11 +5034,11 @@ public void onSendAcknowledgement(Producer producer, 
Message message, MessageId
             // Create message payload, refCnf = 1 now.
             ByteBuf payload = PulsarByteBufAllocator.DEFAULT.heapBuffer(1);
             payloads[i] = payload;
-            log.info("payload_{}.refCnf 1st: {}", i,  payload.refCnt());
+            log.info().attr("payload", i).attr("st", 
payload.refCnt()).log("payload_ .refCnf 1st");

Review Comment:
   **`"st"`, `"nd"`, `"th"` are ordinal suffixes extracted from the message 
text — not valid attr names for a `refCnt()` value.**
   
   ```suggestion
               log.info().attr("payloadIndex", i).attr("refCount", 
payload.refCnt()).log("payload refCount checkpoint 1");
   ```
   Same for lines 5041 (`"nd"` → `"refCount"`, message `"checkpoint 2"`) and 
5067 (`"th"` → `"refCount"`, message `"checkpoint 4"`).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to