Skip to content

Commit 9228e74

Browse files
bxfjbRongtongJin
authored andcommitted
[ISSUE #9358] Timediff should multiply 1000 when query message from tiered storage (#9359)
1 parent 1e07aa5 commit 9228e74

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tieredstore/src/main/java/org/apache/rocketmq/tieredstore/index/IndexStoreFile.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ protected CompletableFuture<List<IndexItem>> queryAsyncFromUnsealedFile(
285285
buffer.position(this.getItemPosition(slotValue));
286286
buffer.get(bytes);
287287
IndexItem indexItem = new IndexItem(bytes);
288-
long storeTimestamp = indexItem.getTimeDiff() + beginTimestamp.get();
288+
long storeTimestamp = indexItem.getTimeDiff() * 1000L + beginTimestamp.get();
289289
if (hashCode == indexItem.getHashCode() &&
290290
beginTime <= storeTimestamp && storeTimestamp <= endTime) {
291291
result.add(indexItem);
@@ -353,7 +353,7 @@ protected CompletableFuture<List<IndexItem>> queryAsyncFromSegmentFile(
353353
for (int i = 0; i < size; i++) {
354354
itemBuffer.get(bytes);
355355
IndexItem indexItem = new IndexItem(bytes);
356-
long storeTimestamp = indexItem.getTimeDiff() + beginTimestamp.get();
356+
long storeTimestamp = indexItem.getTimeDiff() * 1000L + beginTimestamp.get();
357357
if (hashCode == indexItem.getHashCode() &&
358358
beginTime <= storeTimestamp && storeTimestamp <= endTime &&
359359
result.size() < maxCount) {

0 commit comments

Comments
 (0)