Houlong66 opened a new pull request, #10573:
URL: https://github.com/apache/rocketmq/pull/10573

   ### Which Issue(s) This PR Fixes
   
   - Fixes #10572
   
   ### Brief Description
   
   This PR adds a native dual-TTL policy for the tiered storage read-ahead 
cache.
   
   The new default behavior keeps unread prefetched entries for `180000ms` 
after creation, then switches entries to a shorter `10000ms` TTL after they are 
read. This gives consumers more time to consume read-ahead batches while 
allowing already-read entries to be released sooner.
   
   Main changes:
   
   - Add `readAheadCacheCreateExpireDuration` and 
`readAheadCacheAfterReadExpireDuration` to `MessageStoreConfig`.
   - Keep `readAheadCacheExpireDuration` as the legacy single-TTL fallback.
   - Build the read-ahead cache with Caffeine `Expiry` for 
create/read/update-specific expiration.
   - Add focused tests for default resolution, fallback behavior, 
create/read/update expiration semantics, and inverted TTL configuration.
   - Update the tieredstore README configuration table.
   
   ### How Did You Test This Change?
   
   ```bash
   export 
JAVA_HOME=/Library/Java/JavaVirtualMachines/openjdk-11.jdk/Contents/Home
   mvn -pl tieredstore test -Dtest=MessageStoreFetcherImplCacheTest
   mvn -pl tieredstore test -DfailIfNoTests=false
   ```


-- 
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