Skip to content
  • anand76's avatar
    Pass a timeout to FileSystem for random reads (#6751) · ab13d43e
    anand76 authored
    Summary:
    Calculate ```IOOptions::timeout``` using ```ReadOptions::deadline``` and pass it to ```FileSystem::Read/FileSystem::MultiRead```. This allows us to impose a tighter bound on the time taken by Get/MultiGet on FileSystem/Envs that support IO timeouts. Even on those that don't support, check in ```RandomAccessFileReader::Read``` and ```MultiRead``` and return ```Status::TimedOut()``` if the deadline is exceeded.
    
    For now, TableReader creation, which might do file opens and reads, are not covered. It will be implemented in another PR.
    
    Tests:
    Update existing unit tests to verify the correct timeout value is being passed
    Pull Request resolved: https://github.com/facebook/rocksdb/pull/6751
    
    Reviewed By: riversand963
    
    Differential Revision: D21285631
    
    Pulled By: anand1976
    
    fbshipit-source-id: d89af843e5a91ece866e87aa29438b52a65a8567
    ab13d43e