@@ -821,8 +821,7 @@ class WindowBlockManager
821821        return  mIsSWA ;
822822    }
823823
824-     [[nodiscard]] std::optional<std::shared_ptr<KVCacheBlock>> findBlocksInReuseTreeByBlockKey (
825-         BlockKey const & blockKey);
824+     [[nodiscard]] std::shared_ptr<KVCacheBlock> findBlocksInReuseTreeByBlockKey (BlockKey const & blockKey);
826825
827826    // ! \brief Unpin blocks by starting from a block id and walking prev pointers.
828827    void  unpinBlocksById (KVCacheBlock::IdType blockId);
@@ -1194,7 +1193,7 @@ class BlockManager
11941193        return  mWindowBlockManagers .at (windowSize).getBlockById (blockId);
11951194    }
11961195
1197-     [[nodiscard]] std::optional<std:: shared_ptr<KVCacheBlock> > findBlocksInReuseTreeByBlockKey (
1196+     [[nodiscard]] std::shared_ptr<KVCacheBlock> findBlocksInReuseTreeByBlockKey (
11981197        BlockKey const & blockKey, SizeType32 windowSize)
11991198    {
12001199        return  mWindowBlockManagers .at (windowSize).findBlocksInReuseTreeByBlockKey (blockKey);
@@ -1491,7 +1490,7 @@ class BaseKVCacheManager
14911490
14921491    [[nodiscard]] virtual  CacheType getCacheType () const  = 0;
14931492
1494-     [[nodiscard]] virtual  std::optional<std:: shared_ptr<KVCacheBlock> > findBlocksInReuseTreeByBlockKey (
1493+     [[nodiscard]] virtual  std::shared_ptr<KVCacheBlock> findBlocksInReuseTreeByBlockKey (
14951494        BlockKey const & blockKey, SizeType32 windowSize)
14961495        = 0;
14971496
@@ -1794,7 +1793,7 @@ class KVCacheManager : public BaseKVCacheManager
17941793        mBlockManager .flushIterationEvents ();
17951794    }
17961795
1797-     std::optional<std:: shared_ptr<KVCacheBlock> > findBlocksInReuseTreeByBlockKey (
1796+     std::shared_ptr<KVCacheBlock> findBlocksInReuseTreeByBlockKey (
17981797        BlockKey const & blockKey, SizeType32 windowSize) override 
17991798    {
18001799        return  mBlockManager .findBlocksInReuseTreeByBlockKey (blockKey, windowSize);
0 commit comments