提交 e7ac7363 编写于 作者: P Peter Dillinger 提交者: Facebook GitHub Bot

Add to HISTORY and minor loose ends from #9294, #9254 (#9386)

Summary:
Loose ends relate to mmap on 32-bit systems. (Testing is more
complicated when the feature was completely disabled on 32-bit.)

Pull Request resolved: https://github.com/facebook/rocksdb/pull/9386

Test Plan: CI

Reviewed By: ajkr

Differential Revision: D33590715

Pulled By: pdillinger

fbshipit-source-id: f2637036a538a552200adee65b6765fce8cae27b
上级 fc9d4071
......@@ -6,10 +6,12 @@
* Made the Env class extend the Customizable class. Implementations need to be registered with the ObjectRegistry and to implement a Name() method in order to be created via this method.
* `Options::OldDefaults` is marked deprecated, as it is no longer maintained.
* Add ObjectLibrary::AddFactory and ObjectLibrary::PatternEntry classes. This method and associated class are the preferred mechanism for registering factories with the ObjectLibrary going forward. The ObjectLibrary::Register method, which uses regular expressions and may be problematic, is deprecated and will be in a future release.
* Changed `BlockBasedTableOptions::block_size` from `size_t` to `uint64_t`.
* Added API warning against using `Iterator::Refresh()` together with `DB::DeleteRange()`, which are incompatible and have always risked causing the refreshed iterator to return incorrect results.
### Behavior Changes
* `DB::DestroyColumnFamilyHandle()` will return Status::InvalidArgument() if called with `DB::DefaultColumnFamily()`.
* On 32-bit platforms, mmap reads are no longer quietly disabled, just discouraged.
### New Features
* Added `Options::DisableExtraChecks()` that can be used to improve peak write performance by disabling checks that should not be necessary in the absence of software logic errors or CPU+memory hardware errors. (Default options are slowly moving toward some performance overheads for extra correctness checking.)
......@@ -22,6 +24,9 @@
* Fixed a bug of Sync() and Fsync() not using `fcntl(F_FULLFSYNC)` on OS X and iOS.
* Fixed a significant performance regression in version 6.26 when a prefix extractor is used on the read path (Seek, Get, MultiGet). (Excessive time was spent in SliceTransform::AsString().)
### New Features
* Added RocksJava support for MacOS universal binary (ARM+x86)
## 6.28.0 (2021-12-17)
### New Features
* Introduced 'CommitWithTimestamp' as a new tag. Currently, there is no API for user to trigger a write with this tag to the WAL. This is part of the efforts to support write-commited transactions with user-defined timestamps.
......
......@@ -558,7 +558,7 @@ PosixRandomAccessFile::PosixRandomAccessFile(
#endif
{
assert(!options.use_direct_reads || !options.use_mmap_reads);
assert(!options.use_mmap_reads || sizeof(void*) < 8);
assert(!options.use_mmap_reads);
}
PosixRandomAccessFile::~PosixRandomAccessFile() { close(fd_); }
......
......@@ -84,7 +84,8 @@ struct EnvOptions {
// Construct from Options
explicit EnvOptions(const DBOptions& options);
// If true, then use mmap to read data
// If true, then use mmap to read data.
// Not recommended for 32-bit OS.
bool use_mmap_reads = false;
// If true, then use mmap to write data
......
......@@ -772,7 +772,9 @@ struct DBOptions {
// large amounts of data (such as xfs's allocsize option).
size_t manifest_preallocation_size = 4 * 1024 * 1024;
// Allow the OS to mmap file for reading sst tables. Default: false
// Allow the OS to mmap file for reading sst tables.
// Not recommended for 32-bit OS.
// Default: false
bool allow_mmap_reads = false;
// Allow the OS to mmap file for writing.
......
......@@ -297,9 +297,9 @@ IOStatus WinFileSystem::NewRandomAccessFile(
UniqueCloseHandlePtr fileGuard(hFile, CloseHandleFunc);
// CAUTION! This will map the entire file into the process address space
if (options.use_mmap_reads && sizeof(void*) >= 8) {
// Use mmap when virtual address-space is plentiful.
// CAUTION! This will map the entire file into the process address space.
// Not recommended for 32-bit platforms.
if (options.use_mmap_reads) {
uint64_t fileSize;
s = GetFileSize(fname, IOOptions(), &fileSize, dbg);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册