mirror of
https://github.com/facebook/rocksdb.git
synced 2026-11-07 11:32:34 -05:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
72820d70cf | ||
|
|
145a50ba00 | ||
|
|
0607f17755 | ||
|
|
2e2c87a53d |
No files matched your search
@@ -1,6 +1,13 @@
|
||||
# Rocksdb Change Log
|
||||
> NOTE: Entries for next release do not go here. Follow instructions in `unreleased_history/README.txt`
|
||||
|
||||
## 8.5.4 (09/26/2023)
|
||||
### Bug Fixes
|
||||
* Fixed a bug where compaction read under non direct IO still falls back to RocksDB internal prefetching after file system's prefetching returns non-OK status other than `Status::NotSupported()`
|
||||
|
||||
### Behavior Changes
|
||||
* For non direct IO, eliminate the file system prefetching attempt for compaction read when `Options::compaction_readahead_size` is 0
|
||||
|
||||
## 8.5.3 (09/01/2023)
|
||||
### Bug Fixes
|
||||
* Fixed a race condition in `GenericRateLimiter` that could cause it to stop granting requests
|
||||
|
||||
Vendored
+1
@@ -21,6 +21,7 @@
|
||||
#ifdef __SSE4_2__
|
||||
#ifdef _WIN32
|
||||
#include <intrin.h>
|
||||
#define _rdtsc() __rdtsc()
|
||||
#else
|
||||
#include <x86intrin.h>
|
||||
#endif
|
||||
|
||||
+4
-10
@@ -151,6 +151,7 @@ TEST_P(PrefetchTest, Basic) {
|
||||
Options options;
|
||||
SetGenericOptions(env.get(), use_direct_io, options);
|
||||
options.statistics = CreateDBStatistics();
|
||||
options.compaction_readahead_size = 2 * 1024 * 1024;
|
||||
|
||||
const int kNumKeys = 1100;
|
||||
int buff_prefetch_count = 0;
|
||||
@@ -238,16 +239,9 @@ TEST_P(PrefetchTest, Basic) {
|
||||
fs->ClearPrefetchCount();
|
||||
} else {
|
||||
ASSERT_FALSE(fs->IsPrefetchCalled());
|
||||
if (use_direct_io) {
|
||||
// To rule out false positive by the SST file tail prefetch during
|
||||
// compaction output verification
|
||||
ASSERT_GT(buff_prefetch_count, 1);
|
||||
} else {
|
||||
// In buffered IO, compaction readahead size is 0, leading to no prefetch
|
||||
// during compaction input read
|
||||
ASSERT_EQ(buff_prefetch_count, 1);
|
||||
}
|
||||
|
||||
// To rule out false positive by the SST file tail prefetch during
|
||||
// compaction output verification
|
||||
ASSERT_GT(buff_prefetch_count, 1);
|
||||
buff_prefetch_count = 0;
|
||||
|
||||
ASSERT_GT(cur_table_open_prefetch_tail_read.count,
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
// minor or major version number planned for release.
|
||||
#define ROCKSDB_MAJOR 8
|
||||
#define ROCKSDB_MINOR 5
|
||||
#define ROCKSDB_PATCH 3
|
||||
#define ROCKSDB_PATCH 4
|
||||
|
||||
// Do not use these. We made the mistake of declaring macros starting with
|
||||
// double underscore. Now we have to live with our choice. We'll deprecate these
|
||||
|
||||
@@ -21,7 +21,7 @@ void BlockPrefetcher::PrefetchIfNeeded(
|
||||
const size_t offset = handle.offset();
|
||||
|
||||
if (is_for_compaction) {
|
||||
if (!rep->file->use_direct_io()) {
|
||||
if (!rep->file->use_direct_io() && compaction_readahead_size_ > 0) {
|
||||
// If FS supports prefetching (readahead_limit_ will be non zero in that
|
||||
// case) and current block exists in prefetch buffer then return.
|
||||
if (offset + len <= readahead_limit_) {
|
||||
@@ -32,11 +32,12 @@ void BlockPrefetcher::PrefetchIfNeeded(
|
||||
if (s.ok()) {
|
||||
readahead_limit_ = offset + len + compaction_readahead_size_;
|
||||
return;
|
||||
} else if (!s.IsNotSupported()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
// If FS prefetch is not supported, fall back to use internal prefetch
|
||||
// buffer. Discarding other return status of Prefetch calls intentionally,
|
||||
// as we can fallback to reading from disk if Prefetch fails.
|
||||
// buffer.
|
||||
//
|
||||
// num_file_reads is used by FilePrefetchBuffer only when
|
||||
// implicit_auto_readahead is set.
|
||||
@@ -115,8 +116,6 @@ void BlockPrefetcher::PrefetchIfNeeded(
|
||||
}
|
||||
|
||||
// If prefetch is not supported, fall back to use internal prefetch buffer.
|
||||
// Discarding other return status of Prefetch calls intentionally, as
|
||||
// we can fallback to reading from disk if Prefetch fails.
|
||||
Status s = rep->file->Prefetch(
|
||||
handle.offset(),
|
||||
BlockBasedTable::BlockSizeWithTrailer(handle) + readahead_size_,
|
||||
|
||||
+7
-1
@@ -1117,7 +1117,13 @@ static inline Function Choose_Extend() {
|
||||
}
|
||||
#elif defined(__SSE4_2__) && defined(__PCLMUL__) && !defined NO_THREEWAY_CRC32C
|
||||
// NOTE: runtime detection no longer supported on x86
|
||||
(void)ExtendImpl<DefaultCRC32>; // suppress unused warning
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable: 4551)
|
||||
#endif
|
||||
(void)ExtendImpl<DefaultCRC32>; // suppress unused warning
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(default: 4551)
|
||||
#endif
|
||||
return crc32c_3way;
|
||||
#else
|
||||
return ExtendImpl<DefaultCRC32>;
|
||||
|
||||
Reference in new issue
Block a user