mirror of
https://github.com/facebook/rocksdb.git
synced 2026-07-07 14:47:40 +08:00
Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 87d4df1f07 | |||
| faae96da2e | |||
| 165026074a | |||
| 6a060888aa | |||
| d2ebdea566 | |||
| 6f7cabeac8 | |||
| adb9bf5179 | |||
| 7dd5e91e39 | |||
| e94141d848 | |||
| bcf88d48ce | |||
| f6d01f0f6e | |||
| e223cd46c6 |
+54
@@ -1,6 +1,60 @@
|
||||
# Rocksdb Change Log
|
||||
> NOTE: Entries for next release do not go here. Follow instructions in `unreleased_history/README.txt`
|
||||
|
||||
## 9.1.2 (04/24/2024)
|
||||
### Bug Fixes
|
||||
* Fixed hang in `DisableManualCompactions()` where compactions waiting to be scheduled due to conflicts would not be canceled promptly
|
||||
|
||||
## 9.1.1 (04/17/2024)
|
||||
### Bug Fixes
|
||||
* Fixed Java `SstFileMetaData` to prevent throwing `java.lang.NoSuchMethodError`
|
||||
* Fixed a regression when `ColumnFamilyOptions::max_successive_merges > 0` where the CPU overhead for deciding whether to merge could have increased unless the user had set the option `ColumnFamilyOptions::strict_max_successive_merges`
|
||||
|
||||
## 9.1.0 (03/22/2024)
|
||||
### New Features
|
||||
* Added an option, `GetMergeOperandsOptions::continue_cb`, to give users the ability to end `GetMergeOperands()`'s lookup process before all merge operands were found.
|
||||
* *Add sanity checks for ingesting external files that currently checks if the user key comparator used to create the file is compatible with the column family's user key comparator.
|
||||
*Support ingesting external files for column family that has user-defined timestamps in memtable only enabled.
|
||||
* On file systems that support storage level data checksum and reconstruction, retry SST block reads for point lookups, scans, and flush and compaction if there's a checksum mismatch on the initial read.
|
||||
* Some enhancements and fixes to experimental Temperature handling features, including new `default_write_temperature` CF option and opening an `SstFileWriter` with a temperature.
|
||||
* `WriteBatchWithIndex` now supports wide-column point lookups via the `GetEntityFromBatch` API. See the API comments for more details.
|
||||
* *Implement experimental features: API `Iterator::GetProperty("rocksdb.iterator.write-time")` to allow users to get data's approximate write unix time and write data with a specific write time via `WriteBatch::TimedPut` API.
|
||||
|
||||
### Public API Changes
|
||||
* Best-effort recovery (`best_efforts_recovery == true`) may now be used together with atomic flush (`atomic_flush == true`). The all-or-nothing recovery guarantee for atomically flushed data will be upheld.
|
||||
* Remove deprecated option `bottommost_temperature`, already replaced by `last_level_temperature`
|
||||
* Added new PerfContext counters for block cache bytes read - block_cache_index_read_byte, block_cache_filter_read_byte, block_cache_compression_dict_read_byte, and block_cache_read_byte.
|
||||
* Deprecate experimental Remote Compaction APIs - StartV2() and WaitForCompleteV2() and introduce Schedule() and Wait(). The new APIs essentially does the same thing as the old APIs. They allow taking externally generated unique id to wait for remote compaction to complete.
|
||||
* *For API `WriteCommittedTransaction::GetForUpdate`, if the column family enables user-defined timestamp, it was mandated that argument `do_validate` cannot be false, and UDT based validation has to be done with a user set read timestamp. It's updated to make the UDT based validation optional if user sets `do_validate` to false and does not set a read timestamp. With this, `GetForUpdate` skips UDT based validation and it's users' responsibility to enforce the UDT invariant. SO DO NOT skip this UDT-based validation if users do not have ways to enforce the UDT invariant. Ways to enforce the invariant on the users side include manage a monotonically increasing timestamp, commit transactions in a single thread etc.
|
||||
* Defined a new PerfLevel `kEnableWait` to measure time spent by user threads blocked in RocksDB other than mutex, such as a write thread waiting to be added to a write group, a write thread delayed or stalled etc.
|
||||
* `RateLimiter`'s API no longer requires the burst size to be the refill size. Users of `NewGenericRateLimiter()` can now provide burst size in `single_burst_bytes`. Implementors of `RateLimiter::SetSingleBurstBytes()` need to adapt their implementations to match the changed API doc.
|
||||
* Add `write_memtable_time` to the newly introduced PerfLevel `kEnableWait`.
|
||||
|
||||
### Behavior Changes
|
||||
* `RateLimiter`s created by `NewGenericRateLimiter()` no longer modify the refill period when `SetSingleBurstBytes()` is called.
|
||||
* Merge writes will only keep merge operand count within `ColumnFamilyOptions::max_successive_merges` when the key's merge operands are all found in memory, unless `strict_max_successive_merges` is explicitly set.
|
||||
|
||||
### Bug Fixes
|
||||
* Fixed `kBlockCacheTier` reads to return `Status::Incomplete` when I/O is needed to fetch a merge chain's base value from a blob file.
|
||||
* Fixed `kBlockCacheTier` reads to return `Status::Incomplete` on table cache miss rather than incorrectly returning an empty value.
|
||||
* Fixed a data race in WalManager that may affect how frequent PurgeObsoleteWALFiles() runs.
|
||||
* Re-enable the recycle_log_file_num option in DBOptions for kPointInTimeRecovery WAL recovery mode, which was previously disabled due to a bug in the recovery logic. This option is incompatible with WriteOptions::disableWAL. A Status::InvalidArgument() will be returned if disableWAL is specified.
|
||||
|
||||
### Performance Improvements
|
||||
* Java API `multiGet()` variants now take advantage of the underlying batched `multiGet()` performance improvements.
|
||||
Before
|
||||
```
|
||||
Benchmark (columnFamilyTestType) (keyCount) (keySize) (multiGetSize) (valueSize) Mode Cnt Score Error Units
|
||||
MultiGetBenchmarks.multiGetList10 no_column_family 10000 16 100 64 thrpt 25 6315.541 ± 8.106 ops/s
|
||||
MultiGetBenchmarks.multiGetList10 no_column_family 10000 16 100 1024 thrpt 25 6975.468 ± 68.964 ops/s
|
||||
```
|
||||
After
|
||||
```
|
||||
Benchmark (columnFamilyTestType) (keyCount) (keySize) (multiGetSize) (valueSize) Mode Cnt Score Error Units
|
||||
MultiGetBenchmarks.multiGetList10 no_column_family 10000 16 100 64 thrpt 25 7046.739 ± 13.299 ops/s
|
||||
MultiGetBenchmarks.multiGetList10 no_column_family 10000 16 100 1024 thrpt 25 7654.521 ± 60.121 ops/s
|
||||
```
|
||||
|
||||
## 9.0.0 (02/16/2024)
|
||||
### New Features
|
||||
* Provide support for FSBuffer for point lookups. Also added support for scans and compactions that don't go through prefetching.
|
||||
|
||||
@@ -163,24 +163,6 @@ case "$TARGET_OS" in
|
||||
PLATFORM_LDFLAGS="$PLATFORM_LDFLAGS -latomic"
|
||||
fi
|
||||
PLATFORM_LDFLAGS="$PLATFORM_LDFLAGS -lpthread -lrt -ldl"
|
||||
if test -z "$ROCKSDB_USE_IO_URING"; then
|
||||
ROCKSDB_USE_IO_URING=1
|
||||
fi
|
||||
if test "$ROCKSDB_USE_IO_URING" -ne 0; then
|
||||
# check for liburing
|
||||
$CXX $PLATFORM_CXXFLAGS -x c++ - -luring -o test.o 2>/dev/null <<EOF
|
||||
#include <liburing.h>
|
||||
int main() {
|
||||
struct io_uring ring;
|
||||
io_uring_queue_init(1, &ring, 0);
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
if [ "$?" = 0 ]; then
|
||||
PLATFORM_LDFLAGS="$PLATFORM_LDFLAGS -luring"
|
||||
COMMON_FLAGS="$COMMON_FLAGS -DROCKSDB_IOURING_PRESENT"
|
||||
fi
|
||||
fi
|
||||
# PORT_FILES=port/linux/linux_specific.cc
|
||||
;;
|
||||
SunOS)
|
||||
@@ -614,6 +596,24 @@ EOF
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -z "$ROCKSDB_USE_IO_URING"; then
|
||||
ROCKSDB_USE_IO_URING=1
|
||||
fi
|
||||
if [ "$ROCKSDB_USE_IO_URING" -ne 0 -a "$PLATFORM" = OS_LINUX ]; then
|
||||
# check for liburing
|
||||
$CXX $PLATFORM_CXXFLAGS -x c++ - -luring -o test.o 2>/dev/null <<EOF
|
||||
#include <liburing.h>
|
||||
int main() {
|
||||
struct io_uring ring;
|
||||
io_uring_queue_init(1, &ring, 0);
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
if [ "$?" = 0 ]; then
|
||||
PLATFORM_LDFLAGS="$PLATFORM_LDFLAGS -luring"
|
||||
COMMON_FLAGS="$COMMON_FLAGS -DROCKSDB_IOURING_PRESENT"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# TODO(tec): Fix -Wshorten-64-to-32 errors on FreeBSD and enable the warning.
|
||||
|
||||
-1
@@ -129,7 +129,6 @@ TEST_F(CacheReservationManagerTest,
|
||||
|
||||
TEST(CacheReservationManagerIncreaseReservcationOnFullCacheTest,
|
||||
IncreaseCacheReservationOnFullCache) {
|
||||
;
|
||||
constexpr std::size_t kSizeDummyEntry =
|
||||
CacheReservationManagerImpl<CacheEntryRole::kMisc>::GetDummyEntrySize();
|
||||
constexpr std::size_t kSmallCacheCapacity = 4 * kSizeDummyEntry;
|
||||
|
||||
@@ -3997,7 +3997,7 @@ TEST_P(DBCompactionTestWithParam, FullCompactionInBottomPriThreadPool) {
|
||||
Env::Default()->SetBackgroundThreads(0, Env::Priority::BOTTOM);
|
||||
}
|
||||
|
||||
TEST_F(DBCompactionTest, CancelCompactionWaitingOnConflict) {
|
||||
TEST_F(DBCompactionTest, CancelCompactionWaitingOnRunningConflict) {
|
||||
// This test verifies cancellation of a compaction waiting to be scheduled due
|
||||
// to conflict with a running compaction.
|
||||
//
|
||||
@@ -4036,7 +4036,7 @@ TEST_F(DBCompactionTest, CancelCompactionWaitingOnConflict) {
|
||||
// Make sure the manual compaction has seen the conflict before being canceled
|
||||
ROCKSDB_NAMESPACE::SyncPoint::GetInstance()->LoadDependency(
|
||||
{{"ColumnFamilyData::CompactRange:Return",
|
||||
"DBCompactionTest::CancelCompactionWaitingOnConflict:"
|
||||
"DBCompactionTest::CancelCompactionWaitingOnRunningConflict:"
|
||||
"PreDisableManualCompaction"}});
|
||||
auto manual_compaction_thread = port::Thread([this]() {
|
||||
ASSERT_TRUE(db_->CompactRange(CompactRangeOptions(), nullptr, nullptr)
|
||||
@@ -4047,12 +4047,73 @@ TEST_F(DBCompactionTest, CancelCompactionWaitingOnConflict) {
|
||||
// despite finding a conflict with an automatic compaction that is still
|
||||
// running
|
||||
TEST_SYNC_POINT(
|
||||
"DBCompactionTest::CancelCompactionWaitingOnConflict:"
|
||||
"DBCompactionTest::CancelCompactionWaitingOnRunningConflict:"
|
||||
"PreDisableManualCompaction");
|
||||
db_->DisableManualCompaction();
|
||||
manual_compaction_thread.join();
|
||||
}
|
||||
|
||||
TEST_F(DBCompactionTest, CancelCompactionWaitingOnScheduledConflict) {
|
||||
// This test verifies cancellation of a compaction waiting to be scheduled due
|
||||
// to conflict with a scheduled (but not running) compaction.
|
||||
//
|
||||
// A `CompactRange()` in universal compacts all files, waiting for files to
|
||||
// become available if they are locked for another compaction. This test
|
||||
// blocks the compaction thread pool and then calls `CompactRange()` twice.
|
||||
// The first call to `CompactRange()` schedules a compaction that is queued
|
||||
// in the thread pool. The second call to `CompactRange()` blocks on the first
|
||||
// call due to the conflict in file picking. The test verifies that
|
||||
// `DisableManualCompaction()` can cancel both while the thread pool remains
|
||||
// blocked.
|
||||
const int kNumSortedRuns = 4;
|
||||
|
||||
Options options = CurrentOptions();
|
||||
options.compaction_style = kCompactionStyleUniversal;
|
||||
options.disable_auto_compactions = true;
|
||||
options.memtable_factory.reset(
|
||||
test::NewSpecialSkipListFactory(KNumKeysByGenerateNewFile - 1));
|
||||
Reopen(options);
|
||||
|
||||
test::SleepingBackgroundTask sleeping_task_low;
|
||||
env_->Schedule(&test::SleepingBackgroundTask::DoSleepTask, &sleeping_task_low,
|
||||
Env::Priority::LOW);
|
||||
|
||||
// Fill overlapping files in L0
|
||||
Random rnd(301);
|
||||
for (int i = 0; i < kNumSortedRuns; ++i) {
|
||||
int key_idx = 0;
|
||||
GenerateNewFile(&rnd, &key_idx, false /* nowait */);
|
||||
}
|
||||
|
||||
std::atomic<int> num_compact_range_calls{0};
|
||||
ROCKSDB_NAMESPACE::SyncPoint::GetInstance()->SetCallBack(
|
||||
"ColumnFamilyData::CompactRange:Return",
|
||||
[&](void* /* arg */) { num_compact_range_calls++; });
|
||||
|
||||
ROCKSDB_NAMESPACE::SyncPoint::GetInstance()->EnableProcessing();
|
||||
|
||||
const int kNumManualCompactions = 2;
|
||||
port::Thread manual_compaction_threads[kNumManualCompactions];
|
||||
for (int i = 0; i < kNumManualCompactions; i++) {
|
||||
manual_compaction_threads[i] = port::Thread([this]() {
|
||||
ASSERT_TRUE(db_->CompactRange(CompactRangeOptions(), nullptr, nullptr)
|
||||
.IsIncomplete());
|
||||
});
|
||||
}
|
||||
while (num_compact_range_calls < kNumManualCompactions) {
|
||||
}
|
||||
|
||||
// Cancel it. Threads should be joinable, i.e., both the scheduled and blocked
|
||||
// manual compactions were canceled despite no compaction could have ever run.
|
||||
db_->DisableManualCompaction();
|
||||
for (int i = 0; i < kNumManualCompactions; i++) {
|
||||
manual_compaction_threads[i].join();
|
||||
}
|
||||
|
||||
sleeping_task_low.WakeUp();
|
||||
sleeping_task_low.WaitUntilDone();
|
||||
}
|
||||
|
||||
TEST_F(DBCompactionTest, OptimizedDeletionObsoleting) {
|
||||
// Deletions can be dropped when compacted to non-last level if they fall
|
||||
// outside the lower-level files' key-ranges.
|
||||
|
||||
@@ -2154,16 +2154,6 @@ Status DBImpl::RunManualCompaction(
|
||||
manual.begin, manual.end, &manual.manual_end, &manual_conflict,
|
||||
max_file_num_to_ignore, trim_ts)) == nullptr &&
|
||||
manual_conflict))) {
|
||||
if (!scheduled) {
|
||||
// There is a conflicting compaction
|
||||
if (manual_compaction_paused_ > 0 || manual.canceled == true) {
|
||||
// Stop waiting since it was canceled. Pretend the error came from
|
||||
// compaction so the below cleanup/error handling code can process it.
|
||||
manual.done = true;
|
||||
manual.status =
|
||||
Status::Incomplete(Status::SubCode::kManualCompactionPaused);
|
||||
}
|
||||
}
|
||||
if (!manual.done) {
|
||||
bg_cv_.Wait();
|
||||
}
|
||||
@@ -2238,6 +2228,17 @@ Status DBImpl::RunManualCompaction(
|
||||
*final_output_level = compaction->output_level();
|
||||
}
|
||||
}
|
||||
if (!scheduled) {
|
||||
// There is nothing scheduled to wait on, so any cancellation can end the
|
||||
// manual now.
|
||||
if (manual_compaction_paused_ > 0 || manual.canceled == true) {
|
||||
// Stop waiting since it was canceled. Pretend the error came from
|
||||
// compaction so the below cleanup/error handling code can process it.
|
||||
manual.done = true;
|
||||
manual.status =
|
||||
Status::Incomplete(Status::SubCode::kManualCompactionPaused);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
log_buffer.FlushBufferToLog();
|
||||
|
||||
+3
-2
@@ -1621,7 +1621,8 @@ Status MemTable::UpdateCallback(SequenceNumber seq, const Slice& key,
|
||||
return Status::NotFound();
|
||||
}
|
||||
|
||||
size_t MemTable::CountSuccessiveMergeEntries(const LookupKey& key) {
|
||||
size_t MemTable::CountSuccessiveMergeEntries(const LookupKey& key,
|
||||
size_t limit) {
|
||||
Slice memkey = key.memtable_key();
|
||||
|
||||
// A total ordered iterator is costly for some memtablerep (prefix aware
|
||||
@@ -1633,7 +1634,7 @@ size_t MemTable::CountSuccessiveMergeEntries(const LookupKey& key) {
|
||||
|
||||
size_t num_successive_merges = 0;
|
||||
|
||||
for (; iter->Valid(); iter->Next()) {
|
||||
for (; iter->Valid() && num_successive_merges < limit; iter->Next()) {
|
||||
const char* entry = iter->key();
|
||||
uint32_t key_length = 0;
|
||||
const char* iter_key_ptr = GetVarint32Ptr(entry, entry + 5, &key_length);
|
||||
|
||||
+4
-3
@@ -326,9 +326,10 @@ class MemTable {
|
||||
const ProtectionInfoKVOS64* kv_prot_info);
|
||||
|
||||
// Returns the number of successive merge entries starting from the newest
|
||||
// entry for the key up to the last non-merge entry or last entry for the
|
||||
// key in the memtable.
|
||||
size_t CountSuccessiveMergeEntries(const LookupKey& key);
|
||||
// entry for the key. The count ends when the oldest entry in the memtable
|
||||
// with which the newest entry would be merged is reached, or the count
|
||||
// reaches `limit`.
|
||||
size_t CountSuccessiveMergeEntries(const LookupKey& key, size_t limit);
|
||||
|
||||
// Update counters and flush status after inserting a whole write batch
|
||||
// Used in concurrent memtable inserts.
|
||||
|
||||
+4
-2
@@ -2623,8 +2623,10 @@ class MemTableInserter : public WriteBatch::Handler {
|
||||
LookupKey lkey(key, sequence_);
|
||||
|
||||
// Count the number of successive merges at the head
|
||||
// of the key in the memtable
|
||||
size_t num_merges = mem->CountSuccessiveMergeEntries(lkey);
|
||||
// of the key in the memtable. Limit the count to the threshold for
|
||||
// triggering merge to prevent unnecessary counting overhead.
|
||||
size_t num_merges = mem->CountSuccessiveMergeEntries(
|
||||
lkey, moptions->max_successive_merges /* limit */);
|
||||
|
||||
if (num_merges >= moptions->max_successive_merges) {
|
||||
perform_merge = true;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
// minor or major version number planned for release.
|
||||
#define ROCKSDB_MAJOR 9
|
||||
#define ROCKSDB_MINOR 1
|
||||
#define ROCKSDB_PATCH 0
|
||||
#define ROCKSDB_PATCH 2
|
||||
|
||||
// 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
|
||||
|
||||
+16
-2
@@ -7740,7 +7740,8 @@ class SstFileMetaDataJni : public JavaClass {
|
||||
}
|
||||
|
||||
jmethodID mid = env->GetMethodID(
|
||||
jclazz, "<init>", "(Ljava/lang/String;Ljava/lang/String;JJJ[B[BJZJJ)V");
|
||||
jclazz, "<init>",
|
||||
"(Ljava/lang/String;Ljava/lang/String;JJJ[B[BJZJJ[B)V");
|
||||
if (mid == nullptr) {
|
||||
// exception thrown: NoSuchMethodException or OutOfMemoryError
|
||||
return nullptr;
|
||||
@@ -7780,6 +7781,17 @@ class SstFileMetaDataJni : public JavaClass {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
jbyteArray jfile_checksum = ROCKSDB_NAMESPACE::JniUtil::copyBytes(
|
||||
env, sst_file_meta_data->file_checksum);
|
||||
if (env->ExceptionCheck()) {
|
||||
// exception occurred creating java string
|
||||
env->DeleteLocalRef(jfile_name);
|
||||
env->DeleteLocalRef(jpath);
|
||||
env->DeleteLocalRef(jsmallest_key);
|
||||
env->DeleteLocalRef(jlargest_key);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
jobject jsst_file_meta_data = env->NewObject(
|
||||
jclazz, mid, jfile_name, jpath,
|
||||
static_cast<jlong>(sst_file_meta_data->size),
|
||||
@@ -7788,13 +7800,14 @@ class SstFileMetaDataJni : public JavaClass {
|
||||
jlargest_key, static_cast<jlong>(sst_file_meta_data->num_reads_sampled),
|
||||
static_cast<jboolean>(sst_file_meta_data->being_compacted),
|
||||
static_cast<jlong>(sst_file_meta_data->num_entries),
|
||||
static_cast<jlong>(sst_file_meta_data->num_deletions));
|
||||
static_cast<jlong>(sst_file_meta_data->num_deletions), jfile_checksum);
|
||||
|
||||
if (env->ExceptionCheck()) {
|
||||
env->DeleteLocalRef(jfile_name);
|
||||
env->DeleteLocalRef(jpath);
|
||||
env->DeleteLocalRef(jsmallest_key);
|
||||
env->DeleteLocalRef(jlargest_key);
|
||||
env->DeleteLocalRef(jfile_checksum);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -7803,6 +7816,7 @@ class SstFileMetaDataJni : public JavaClass {
|
||||
env->DeleteLocalRef(jpath);
|
||||
env->DeleteLocalRef(jsmallest_key);
|
||||
env->DeleteLocalRef(jlargest_key);
|
||||
env->DeleteLocalRef(jfile_checksum);
|
||||
|
||||
return jsst_file_meta_data;
|
||||
}
|
||||
|
||||
@@ -1423,6 +1423,33 @@ public class RocksDBTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getColumnFamilyMetadataWithChecksum() throws RocksDBException {
|
||||
final Properties props = new Properties();
|
||||
props.put("file_checksum_gen_factory", "FileChecksumGenCrc32cFactory");
|
||||
final String dbPath = dbFolder.getRoot().getAbsolutePath();
|
||||
|
||||
try (final DBOptions dbOptions = DBOptions.getDBOptionsFromProps(props);
|
||||
final ColumnFamilyOptions cfOptions = new ColumnFamilyOptions();
|
||||
final Options options = new Options(dbOptions, cfOptions).setCreateIfMissing(true)) {
|
||||
try (final RocksDB db = RocksDB.open(options, dbPath);
|
||||
final WriteOptions writeOptions = new WriteOptions().setDisableWAL(true)) {
|
||||
db.put("key".getBytes(UTF_8), "value".getBytes(UTF_8));
|
||||
}
|
||||
|
||||
try (final RocksDB db = RocksDB.open(options, dbFolder.getRoot().getAbsolutePath())) {
|
||||
ColumnFamilyMetaData metadata = db.getColumnFamilyMetaData(); // Exception here
|
||||
List<LevelMetaData> levels = metadata.levels();
|
||||
assertThat(levels).isNotEmpty();
|
||||
List<SstFileMetaData> filesMetadata = levels.get(0).files();
|
||||
assertThat(filesMetadata).isNotEmpty();
|
||||
assertThat(filesMetadata.get(0).fileChecksum()).isNotNull();
|
||||
assertThat(filesMetadata.get(0).fileChecksum()).hasSize(4);
|
||||
assertThat(filesMetadata.get(0).fileChecksum()).isNotEqualTo(new byte[] {0, 0, 0, 0});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Ignore("TODO(AR) re-enable when ready!")
|
||||
@Test
|
||||
public void compactFiles() throws RocksDBException {
|
||||
|
||||
@@ -729,7 +729,7 @@ DEFINE_SYNC_AND_ASYNC(void, BlockBasedTable::MultiGet)
|
||||
}
|
||||
|
||||
// Call the *saver function on each entry/block until it returns false
|
||||
for (; biter->Valid(); biter->Next()) {
|
||||
for (; biter->status().ok() && biter->Valid(); biter->Next()) {
|
||||
ParsedInternalKey parsed_key;
|
||||
Status pik_status = ParseInternalKey(
|
||||
biter->key(), &parsed_key, false /* log_err_key */); // TODO
|
||||
@@ -754,9 +754,6 @@ DEFINE_SYNC_AND_ASYNC(void, BlockBasedTable::MultiGet)
|
||||
done = true;
|
||||
break;
|
||||
}
|
||||
if (s.ok()) {
|
||||
s = biter->status();
|
||||
}
|
||||
}
|
||||
// Write the block cache access.
|
||||
// XXX: There appear to be 'break' statements above that bypass this
|
||||
@@ -779,8 +776,10 @@ DEFINE_SYNC_AND_ASYNC(void, BlockBasedTable::MultiGet)
|
||||
*lookup_data_block_context, lookup_data_block_context->block_key,
|
||||
referenced_key, does_referenced_key_exist, referenced_data_size);
|
||||
}
|
||||
s = biter->status();
|
||||
if (done) {
|
||||
if (s.ok()) {
|
||||
s = biter->status();
|
||||
}
|
||||
if (done || !s.ok()) {
|
||||
// Avoid the extra Next which is expensive in two-level indexes
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
* `RateLimiter`s created by `NewGenericRateLimiter()` no longer modify the refill period when `SetSingleBurstBytes()` is called.
|
||||
@@ -1 +0,0 @@
|
||||
* Merge writes will only keep merge operand count within `ColumnFamilyOptions::max_successive_merges` when the key's merge operands are all found in memory, unless `strict_max_successive_merges` is explicitly set.
|
||||
@@ -1 +0,0 @@
|
||||
* Fixed `kBlockCacheTier` reads to return `Status::Incomplete` when I/O is needed to fetch a merge chain's base value from a blob file.
|
||||
@@ -1 +0,0 @@
|
||||
* Fixed `kBlockCacheTier` reads to return `Status::Incomplete` on table cache miss rather than incorrectly returning an empty value.
|
||||
@@ -1 +0,0 @@
|
||||
* Fixed a data race in WalManager that may affect how frequent PurgeObsoleteWALFiles() runs.
|
||||
@@ -1 +0,0 @@
|
||||
Re-enable the recycle_log_file_num option in DBOptions for kPointInTimeRecovery WAL recovery mode, which was previously disabled due to a bug in the recovery logic. This option is incompatible with WriteOptions::disableWAL. A Status::InvalidArgument() will be returned if disableWAL is specified.
|
||||
@@ -1 +0,0 @@
|
||||
* Added an option, `GetMergeOperandsOptions::continue_cb`, to give users the ability to end `GetMergeOperands()`'s lookup process before all merge operands were found.
|
||||
@@ -1,2 +0,0 @@
|
||||
*Add sanity checks for ingesting external files that currently checks if the user key comparator used to create the file is compatible with the column family's user key comparator.
|
||||
*Support ingesting external files for column family that has user-defined timestamps in memtable only enabled.
|
||||
@@ -1 +0,0 @@
|
||||
On file systems that support storage level data checksum and reconstruction, retry SST block reads for point lookups, scans, and flush and compaction if there's a checksum mismatch on the initial read.
|
||||
@@ -1 +0,0 @@
|
||||
* Some enhancements and fixes to experimental Temperature handling features, including new `default_write_temperature` CF option and opening an `SstFileWriter` with a temperature.
|
||||
@@ -1 +0,0 @@
|
||||
* `WriteBatchWithIndex` now supports wide-column point lookups via the `GetEntityFromBatch` API. See the API comments for more details.
|
||||
@@ -1 +0,0 @@
|
||||
*Implement experimental features: API `Iterator::GetProperty("rocksdb.iterator.write-time")` to allow users to get data's approximate write unix time and write data with a specific write time via `WriteBatch::TimedPut` API.
|
||||
@@ -1,14 +0,0 @@
|
||||
Java API `multiGet()` variants now take advantage of the underlying batched `multiGet()` performance improvements.
|
||||
|
||||
Before
|
||||
```
|
||||
Benchmark (columnFamilyTestType) (keyCount) (keySize) (multiGetSize) (valueSize) Mode Cnt Score Error Units
|
||||
MultiGetBenchmarks.multiGetList10 no_column_family 10000 16 100 64 thrpt 25 6315.541 ± 8.106 ops/s
|
||||
MultiGetBenchmarks.multiGetList10 no_column_family 10000 16 100 1024 thrpt 25 6975.468 ± 68.964 ops/s
|
||||
```
|
||||
After
|
||||
```
|
||||
Benchmark (columnFamilyTestType) (keyCount) (keySize) (multiGetSize) (valueSize) Mode Cnt Score Error Units
|
||||
MultiGetBenchmarks.multiGetList10 no_column_family 10000 16 100 64 thrpt 25 7046.739 ± 13.299 ops/s
|
||||
MultiGetBenchmarks.multiGetList10 no_column_family 10000 16 100 1024 thrpt 25 7654.521 ± 60.121 ops/s
|
||||
```
|
||||
@@ -1 +0,0 @@
|
||||
* Best-effort recovery (`best_efforts_recovery == true`) may now be used together with atomic flush (`atomic_flush == true`). The all-or-nothing recovery guarantee for atomically flushed data will be upheld.
|
||||
@@ -1 +0,0 @@
|
||||
Remove deprecated option `bottommost_temperature`, already replaced by `last_level_temperature`
|
||||
@@ -1 +0,0 @@
|
||||
Added new PerfContext counters for block cache bytes read - block_cache_index_read_byte, block_cache_filter_read_byte, block_cache_compression_dict_read_byte, and block_cache_read_byte.
|
||||
@@ -1 +0,0 @@
|
||||
Deprecate experimental Remote Compaction APIs - StartV2() and WaitForCompleteV2() and introduce Schedule() and Wait(). The new APIs essentially does the same thing as the old APIs. They allow taking externally generated unique id to wait for remote compaction to complete.
|
||||
-1
@@ -1 +0,0 @@
|
||||
*For API `WriteCommittedTransaction::GetForUpdate`, if the column family enables user-defined timestamp, it was mandated that argument `do_validate` cannot be false, and UDT based validation has to be done with a user set read timestamp. It's updated to make the UDT based validation optional if user sets `do_validate` to false and does not set a read timestamp. With this, `GetForUpdate` skips UDT based validation and it's users' responsibility to enforce the UDT invariant. SO DO NOT skip this UDT-based validation if users do not have ways to enforce the UDT invariant. Ways to enforce the invariant on the users side include manage a monotonically increasing timestamp, commit transactions in a single thread etc.
|
||||
@@ -1 +0,0 @@
|
||||
Defined a new PerfLevel `kEnableWait` to measure time spent by user threads blocked in RocksDB other than mutex, such as a write thread waiting to be added to a write group, a write thread delayed or stalled etc.
|
||||
@@ -1 +0,0 @@
|
||||
* `RateLimiter`'s API no longer requires the burst size to be the refill size. Users of `NewGenericRateLimiter()` can now provide burst size in `single_burst_bytes`. Implementors of `RateLimiter::SetSingleBurstBytes()` need to adapt their implementations to match the changed API doc.
|
||||
@@ -1 +0,0 @@
|
||||
* Add `write_memtable_time` to the newly introduced PerfLevel `kEnableWait`.
|
||||
+1
-1
@@ -127,7 +127,7 @@ TEST(Coding, Varint64) {
|
||||
values.push_back(power);
|
||||
values.push_back(power - 1);
|
||||
values.push_back(power + 1);
|
||||
};
|
||||
}
|
||||
|
||||
std::string s;
|
||||
for (unsigned int i = 0; i < values.size(); i++) {
|
||||
|
||||
+9
-9
@@ -2329,7 +2329,7 @@ XXH32_finalize(xxh_u32 hash, const xxh_u8* ptr, size_t len, XXH_alignment align)
|
||||
hash = XXH_rotl32(hash, 17) * XXH_PRIME32_4; \
|
||||
} while (0)
|
||||
|
||||
if (ptr==NULL) XXH_ASSERT(len == 0)
|
||||
if (ptr==nullptr) XXH_ASSERT(len == 0)
|
||||
|
||||
/* Compact rerolled version; generally faster */
|
||||
if (!XXH32_ENDJMP) {
|
||||
@@ -2409,7 +2409,7 @@ XXH32_endian_align(const xxh_u8* input, size_t len, xxh_u32 seed, XXH_alignment
|
||||
{
|
||||
xxh_u32 h32;
|
||||
|
||||
if (input==NULL) XXH_ASSERT(len == 0)
|
||||
if (input==nullptr) XXH_ASSERT(len == 0)
|
||||
|
||||
if (len>=16) {
|
||||
const xxh_u8* const bEnd = input + len;
|
||||
@@ -2495,7 +2495,7 @@ XXH_PUBLIC_API XXH_errorcode XXH32_reset(XXH32_state_t* statePtr, XXH32_hash_t s
|
||||
XXH_PUBLIC_API XXH_errorcode
|
||||
XXH32_update(XXH32_state_t* state, const void* input, size_t len)
|
||||
{
|
||||
if (input==NULL) {
|
||||
if (input==nullptr) {
|
||||
XXH_ASSERT(len == 0)
|
||||
return XXH_OK;
|
||||
}
|
||||
@@ -2802,7 +2802,7 @@ static xxh_u64 XXH64_avalanche(xxh_u64 hash)
|
||||
static XXH_PUREF xxh_u64
|
||||
XXH64_finalize(xxh_u64 hash, const xxh_u8* ptr, size_t len, XXH_alignment align)
|
||||
{
|
||||
if (ptr==NULL) XXH_ASSERT(len == 0)
|
||||
if (ptr==nullptr) XXH_ASSERT(len == 0)
|
||||
len &= 31;
|
||||
while (len >= 8) {
|
||||
xxh_u64 const k1 = XXH64_round(0, XXH_get64bits(ptr));
|
||||
@@ -2847,7 +2847,7 @@ XXH_FORCE_INLINE XXH_PUREF xxh_u64
|
||||
XXH64_endian_align(const xxh_u8* input, size_t len, xxh_u64 seed, XXH_alignment align)
|
||||
{
|
||||
xxh_u64 h64;
|
||||
if (input==NULL) XXH_ASSERT(len == 0)
|
||||
if (input==nullptr) XXH_ASSERT(len == 0)
|
||||
|
||||
if (len>=32) {
|
||||
const xxh_u8* const bEnd = input + len;
|
||||
@@ -2936,7 +2936,7 @@ XXH_PUBLIC_API XXH_errorcode XXH64_reset(XXH_NOESCAPE XXH64_state_t* statePtr, X
|
||||
XXH_PUBLIC_API XXH_errorcode
|
||||
XXH64_update (XXH_NOESCAPE XXH64_state_t* state, XXH_NOESCAPE const void* input, size_t len)
|
||||
{
|
||||
if (input==NULL) {
|
||||
if (input==nullptr) {
|
||||
XXH_ASSERT(len == 0)
|
||||
return XXH_OK;
|
||||
}
|
||||
@@ -5331,7 +5331,7 @@ XXH_PUBLIC_API XXH64_hash_t
|
||||
XXH3_64bits_withSecretandSeed(XXH_NOESCAPE const void* input, size_t length, XXH_NOESCAPE const void* secret, size_t secretSize, XXH64_hash_t seed)
|
||||
{
|
||||
if (length <= XXH3_MIDSIZE_MAX)
|
||||
return XXH3_64bits_internal(input, length, seed, XXH3_kSecret, sizeof(XXH3_kSecret), NULL);
|
||||
return XXH3_64bits_internal(input, length, seed, XXH3_kSecret, sizeof(XXH3_kSecret), nullptr);
|
||||
return XXH3_hashLong_64b_withSecret(input, length, seed, (const xxh_u8*)secret, secretSize);
|
||||
}
|
||||
|
||||
@@ -5368,7 +5368,7 @@ static XXH_MALLOCF void* XXH_alignedMalloc(size_t s, size_t align)
|
||||
XXH_ASSERT(s != 0 && s < (s + align)) /* empty/overflow */
|
||||
{ /* Overallocate to make room for manual realignment and an offset byte */
|
||||
xxh_u8* base = (xxh_u8*)XXH_malloc(s + align);
|
||||
if (base != NULL) {
|
||||
if (base != nullptr) {
|
||||
/*
|
||||
* Get the offset needed to align this pointer.
|
||||
*
|
||||
@@ -5385,7 +5385,7 @@ static XXH_MALLOCF void* XXH_alignedMalloc(size_t s, size_t align)
|
||||
ptr[-1] = (xxh_u8)offset;
|
||||
return ptr;
|
||||
}
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
/*
|
||||
|
||||
@@ -165,7 +165,7 @@ static inline tokutime_t toku_time_now(void) {
|
||||
|
||||
static inline uint64_t toku_current_time_microsec(void) {
|
||||
struct timeval t;
|
||||
gettimeofday(&t, NULL);
|
||||
gettimeofday(&t, nullptr);
|
||||
return t.tv_sec * (1UL * 1000 * 1000) + t.tv_usec;
|
||||
}
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ class GrowableArray {
|
||||
void init(void)
|
||||
// Effect: Initialize the array to contain no elements.
|
||||
{
|
||||
m_array = NULL;
|
||||
m_array = nullptr;
|
||||
m_size = 0;
|
||||
m_size_limit = 0;
|
||||
}
|
||||
@@ -87,7 +87,7 @@ class GrowableArray {
|
||||
// Effect: Deinitialize the array (freeing any memory it uses, for example).
|
||||
{
|
||||
toku_free(m_array);
|
||||
m_array = NULL;
|
||||
m_array = nullptr;
|
||||
m_size = 0;
|
||||
m_size_limit = 0;
|
||||
}
|
||||
@@ -113,7 +113,7 @@ class GrowableArray {
|
||||
// constant.
|
||||
{
|
||||
if (m_size >= m_size_limit) {
|
||||
if (m_array == NULL) {
|
||||
if (m_array == nullptr) {
|
||||
m_size_limit = 1;
|
||||
} else {
|
||||
m_size_limit *= 2;
|
||||
|
||||
Reference in New Issue
Block a user