Files
seaweedfs/weed/util
chrislu 4e98483661 feat: Add cache invalidation on extraction failure (incomplete fix)
Phase 6: Disk Read Fix Attempt #1

Added cache invalidation when extraction fails due to offset beyond cached chunk:
  - extractMessagesFromCache: Returns error when offset beyond cache
  - readHistoricalDataFromDisk: Invalidates bad cache and retries
  - invalidateCachedDiskChunk: New function to remove stale cache

Problem Discovered:
  Cache invalidation works, but re-reading returns SAME incomplete data!
  Example:
    - Request offset 1764
    - Disk read returns 764 messages (1000-1763)
    - Cache stores 1000-1763
    - Request 1764 again → cache invalid → re-read → SAME 764 messages!

Root Cause:
  ReadFromDiskFn (GenLogOnDiskReadFunc) is NOT returning incomplete data
  The disk files ACTUALLY only contain up to offset 1763
  Messages 1764+ are either:
    1. Still in memory (not yet flushed)
    2. In a different file not being read
    3. Lost during flush

Test Results: 73.3% delivery (worse than before 87.9%)
  Cache thrashing causing performance degradation

Next: Fix the actual disk read to handle gaps between flushed data and in-memory data
2025-10-17 12:37:59 -07:00
..
2023-11-26 11:47:20 -08:00
2025-08-21 08:28:07 -07:00
2022-08-15 01:05:35 -07:00
2025-08-31 23:23:02 -07:00
2024-08-07 10:42:00 -07:00
2021-08-20 18:38:18 +08:00
2025-06-03 22:46:10 -07:00
2025-06-03 22:46:10 -07:00
2021-09-01 02:45:42 -07:00
2021-09-01 02:45:42 -07:00
2022-09-25 17:43:42 -07:00
2022-09-25 17:43:42 -07:00
2022-09-25 13:34:55 -07:00
2023-09-21 23:51:32 -07:00
2024-07-07 23:44:36 -07:00
2023-10-01 11:36:27 -07:00
2024-10-31 08:40:05 -07:00