Skip to content

Commit b0cd5f1

Browse files
committed
[ISSUE #9912] Reduce excessive requests for consumer offset timestamps in tiered storage
1 parent 7b4f6c6 commit b0cd5f1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tieredstore/src/test/java/org/apache/rocketmq/tieredstore/TieredMessageStoreTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,10 @@ public void testGetMessageStoreTimeStampAsync() {
268268
configuration.update(properties);
269269
Assert.assertEquals(1, (long) currentStore.getMessageStoreTimeStampAsync(mq.getTopic(), mq.getQueueId(), 0).join());
270270

271+
// If data cannot be fetched from tiered storage,
272+
// there is no need to fallback to local storage.
271273
Mockito.when(fetcher.getMessageStoreTimeStampAsync(anyString(), anyInt(), anyLong())).thenReturn(CompletableFuture.completedFuture(-1L));
272-
Assert.assertEquals(3, (long) currentStore.getMessageStoreTimeStampAsync(mq.getTopic(), mq.getQueueId(), 0).join());
274+
Assert.assertEquals(-1L, (long) currentStore.getMessageStoreTimeStampAsync(mq.getTopic(), mq.getQueueId(), 0).join());
273275
}
274276

275277
@Test

0 commit comments

Comments
 (0)