divijvaidya opened a new pull request, #13935: URL: https://github.com/apache/kafka/pull/13935
This change correctly prints the offset associated with a time index entry instead of printing the reference of the Java object. **Debug logs before this change:** Notice the value of `last entry is now` string in the logs ``` [2023-06-29 16:54:14,753] DEBUG Truncated index /var/folders/b7/gtty4gtx1nxcnd9qwgqr536m0000gr/T/kafka15182151620663328910.tmp to 0 entries; position is now 0 and last entry is now org.apache.kafka.storage.internals.log.TimestampOffset@2d (org.apache.kafka.storage.internals.log.TimeIndex:280) ``` Notice the value of `lastOffset =` string in the logs ``` [2023-06-29 17:00:29,768] DEBUG Loaded index file /var/folders/b7/gtty4gtx1nxcnd9qwgqr536m0000gr/T/kafka12970272451741393509.tmp with maxEntries = 30, maxIndexSize = 360, entries = 0, lastOffset = org.apache.kafka.storage.internals.log.TimestampOffset@2d, file position = 0 (org.apache.kafka.storage.internals.log.TimeIndex:68) ``` **Debug logs after this change:** ``` [2023-06-29 17:06:11,621] DEBUG Truncated index /var/folders/b7/gtty4gtx1nxcnd9qwgqr536m0000gr/T/kafka10329570089261941057.tmp to 0 entries; position is now 0 and last entry is now 45 (org.apache.kafka.storage.internals.log.TimeIndex:280) ``` ``` [2023-06-29 17:32:05,351] DEBUG Loaded index file /var/folders/b7/gtty4gtx1nxcnd9qwgqr536m0000gr/T/kafka17205967388538316017.tmp with maxEntries = 30, maxIndexSize = 360, entries = 0, lastOffset = 45, file position = 0 (org.apache.kafka.storage.internals.log.TimeIndex:68) ``` -- 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]
