Skip to content

Commit

Permalink
S3BackupFileSystem: Add warning when downloading entire files from S3
Browse files Browse the repository at this point in the history
This should serve as a more visible reminder to implement block index caching,
and reduce wasteful re-downloading of entire files.
  • Loading branch information
qris committed Jun 20, 2019
1 parent 7b1fd68 commit 9b88ffc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/backupstore/BackupFileSystem.cpp
Expand Up @@ -231,6 +231,8 @@ std::auto_ptr<IOStream> BackupFileSystem::GetBlockIndexReconstructed(int64_t Obj

// TODO: we shouldn't have to fetch the entire file just to build its block index
// on S3 stores.
BOX_WARNING("Fetching entire file just for its block index: " <<
BOX_FORMAT_OBJECTID(patchID));
std::auto_ptr<IOStream> diff(GetFile(patchID));

// Store the reconstructed metadata (not block data) in a buffer in memory,
Expand Down

0 comments on commit 9b88ffc

Please sign in to comment.