rocksdb/env
Nathan VanBenschoten 37cd617b6b Add virtual Truncate method to Env
Summary:
This change adds a virtual `Truncate` method to `Env`, which truncates
the named file to the specified size. At the moment, this is only
supported for `MockEnv`, but other `Env's` could be extended to override
the method too. This is the same approach that methods like `LinkFile` and
`AreSameFile` have taken.

This is useful for any user of the in-memory `Env`. The implementation's
header is not exported, so before this change, it was impossible to
access it's already existing `Truncate` method.
Closes https://github.com/facebook/rocksdb/pull/3779

Differential Revision: D7785789

Pulled By: ajkr

fbshipit-source-id: 3bcdaeea7b7180529f7d9b496dc67b791a00bbf0
2018-04-26 21:12:51 -07:00
..
env_basic_test.cc Move some files under util/ to separate dirs 2017-04-05 19:09:16 -07:00
env_chroot.cc Change RocksDB License 2017-07-15 16:11:23 -07:00
env_chroot.h Change RocksDB License 2017-07-15 16:11:23 -07:00
env_encryption.cc Fix some typos in comments and docs. 2018-03-08 10:27:25 -08:00
env_hdfs.cc Disallow compactions if there isn't enough free space 2018-03-06 16:27:54 -08:00
env_posix.cc initialize local variable for UBSAN in PosixEnv function 2018-04-25 13:42:02 -07:00
env_test.cc Add crash-recovery correctness check to db_stress 2018-04-24 15:58:22 -07:00
env.cc Add crash-recovery correctness check to db_stress 2018-04-24 15:58:22 -07:00
io_posix.cc Add crash-recovery correctness check to db_stress 2018-04-24 15:58:22 -07:00
io_posix.h Add crash-recovery correctness check to db_stress 2018-04-24 15:58:22 -07:00
mock_env_test.cc Move some files under util/ to separate dirs 2017-04-05 19:09:16 -07:00
mock_env.cc Add virtual Truncate method to Env 2018-04-26 21:12:51 -07:00
mock_env.h Add virtual Truncate method to Env 2018-04-26 21:12:51 -07:00
posix_logger.h Disallow compactions if there isn't enough free space 2018-03-06 16:27:54 -08:00