startIndex < minOffset was previously accepted as long as it stayed
within [0, maxOffset), returning a non-null LargeRocksDBConsumeQueueIterator
whose next() can yield a null CqUnit once the underlying data has been
purged. Callers like ScheduleMessageService rely on iterateFrom returning
null to detect and correct an out-of-range offset (matching ConsumeQueue's
getMinLogicOffset() check); without it they NPE dereferencing the null
CqUnit instead.
Add the same startIndex >= getMinOffsetInQueue() bound used by the
file-based ConsumeQueue to both iterateFrom overloads.
Co-authored-by: maowei.ymw <maowei.ymw@alibaba-inc.com>
* [ISSUE #10639] Reuse a per-thread scratch buffer in CommitLog.checkMessageAndReturnSize
* [ISSUE #10639] Reject corrupt negative totalSize before allocation in checkMessageAndReturnSize
* [ISSUE #10639] Add configurable reuse-buffer cap and unit tests for checkMessageAndReturnSize
* [ISSUE #10639] Default the check-message reuse-buffer cap to 1 MiB
---------
Co-authored-by: wangjiahua.wjh <wangjiahua.wjh@alibaba-inc.com>
* When IndexRocksDBEnable or TransRocksDBEnable are enabled, we need to take these two offsets into account to accelerate recovery.
* Add UTs
* Refactor the code based on the review comments
* Revert "[ISSUE #8127]Optimize the metric calculation logic of the time wheel"
* Remove useless import
* Refactor Code
* Refactor Code
* Refactor Code
* Refactor Code
* Refactor Code
* Implement accelerated recovery for the file-based ConsumeQueue.
* Implement accelerated recovery for the file-based ConsumeQueue.
Change-Id: Ieac45d0582f2f83d977aeb8e6f5084268b7f8752
* Implement accelerated recovery for the file-based ConsumeQueue.
* Ignore testTruncateCQ UT
---------
Co-authored-by: RongtongJin <user@example.com>
* Fix StoreCheckpoint: set logicsMsgTimestamp only after CQ flush, use logicsMsgTempTimestamp for in-memory storetime
Change-Id: I6085bf6efaef84168ece31d080481717465f2b13
* rename to tmpLogicsMsgTimestamp
Change-Id: Ia65ca06751f765bdc2bf053c58e08789f4b2fb22
---------
Co-authored-by: guyinyou <guyinyou.gyy@alibaba-inc.com>
When the error 'failed to check message CRC, not found CRC in properties' occurs,
now it will print the full message content including topic, properties map,
properties length, and full message hex for debugging purposes.
Change-Id: I26d977e13802c5e69d01f16512e40d121dcff354
Co-developed-by: Cursor <noreply@cursor.com>
Co-authored-by: guyinyou <guyinyou.gyy@alibaba-inc.com>
* Revert "[ISSUE #8127]Optimize the metric calculation logic of the time wheel"
* Revert "[ISSUE #8127]Optimize the metric calculation logic of the time wheel"
* Revert "[ISSUE #8127]Optimize the metric calculation logic of the time wheel"
---------
Co-authored-by: RongtongJin <user@example.com>