mirror of
https://github.com/facebook/rocksdb.git
synced 2026-11-07 11:32:34 -05:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
791a7fe402 | ||
|
|
ecfb8779c2 | ||
|
|
869801945b | ||
|
|
a89bd81df4 |
No files matched your search
@@ -1,4 +1,10 @@
|
||||
# Rocksdb Change Log
|
||||
## 8.3.3 (09/01/2023)
|
||||
### Bug Fixes
|
||||
* Fix a bug where if there is an error reading from offset 0 of a file from L1+ and that the file is not the first file in the sorted run, data can be lost in compaction and read/scan can return incorrect results.
|
||||
* Fix a bug where iterator may return incorrect result for DeleteRange() users if there was an error reading from a file.
|
||||
* Fixed a race condition in `GenericRateLimiter` that could cause it to stop granting requests
|
||||
|
||||
## 8.3.2 (06/14/2023)
|
||||
### Bug Fixes
|
||||
* Reduced cases of illegally using Env::Default() during static destruction by never destroying the internal PosixEnv itself (except for builds checking for memory leaks). (#11538)
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
// minor or major version number planned for release.
|
||||
#define ROCKSDB_MAJOR 8
|
||||
#define ROCKSDB_MINOR 3
|
||||
#define ROCKSDB_PATCH 2
|
||||
#define ROCKSDB_PATCH 3
|
||||
|
||||
// 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
|
||||
|
||||
@@ -329,6 +329,7 @@ void CompactionMergingIterator::FindNextVisibleKey() {
|
||||
assert(current->iter.status().ok());
|
||||
minHeap_.replace_top(current);
|
||||
} else {
|
||||
considerStatus(current->iter.status());
|
||||
minHeap_.pop();
|
||||
}
|
||||
if (range_tombstone_iters_[current->level]) {
|
||||
|
||||
@@ -308,6 +308,7 @@ class MergingIterator : public InternalIterator {
|
||||
// holds after this call, and minHeap_.top().iter points to the
|
||||
// first key >= target among children_ that is not covered by any range
|
||||
// tombstone.
|
||||
status_ = Status::OK();
|
||||
SeekImpl(target);
|
||||
FindNextVisibleKey();
|
||||
|
||||
@@ -321,6 +322,7 @@ class MergingIterator : public InternalIterator {
|
||||
void SeekForPrev(const Slice& target) override {
|
||||
assert(range_tombstone_iters_.empty() ||
|
||||
range_tombstone_iters_.size() == children_.size());
|
||||
status_ = Status::OK();
|
||||
SeekForPrevImpl(target);
|
||||
FindPrevVisibleKey();
|
||||
|
||||
@@ -798,7 +800,6 @@ void MergingIterator::SeekImpl(const Slice& target, size_t starting_level,
|
||||
active_.erase(active_.lower_bound(starting_level), active_.end());
|
||||
}
|
||||
|
||||
status_ = Status::OK();
|
||||
IterKey current_search_key;
|
||||
current_search_key.SetInternalKey(target, false /* copy */);
|
||||
// Seek target might change to some range tombstone end key, so
|
||||
@@ -931,6 +932,7 @@ bool MergingIterator::SkipNextDeleted() {
|
||||
InsertRangeTombstoneToMinHeap(current->level, true /* start_key */,
|
||||
true /* replace_top */);
|
||||
} else {
|
||||
// TruncatedRangeDelIterator does not have status
|
||||
minHeap_.pop();
|
||||
}
|
||||
return true /* current key deleted */;
|
||||
@@ -988,6 +990,9 @@ bool MergingIterator::SkipNextDeleted() {
|
||||
if (current->iter.Valid()) {
|
||||
assert(current->iter.status().ok());
|
||||
minHeap_.push(current);
|
||||
} else {
|
||||
// TODO(cbi): check status and early return if non-ok.
|
||||
considerStatus(current->iter.status());
|
||||
}
|
||||
// Invariants (rti) and (phi)
|
||||
if (range_tombstone_iters_[current->level] &&
|
||||
@@ -1027,6 +1032,7 @@ bool MergingIterator::SkipNextDeleted() {
|
||||
if (current->iter.Valid()) {
|
||||
minHeap_.replace_top(current);
|
||||
} else {
|
||||
considerStatus(current->iter.status());
|
||||
minHeap_.pop();
|
||||
}
|
||||
return true /* current key deleted */;
|
||||
@@ -1078,7 +1084,6 @@ void MergingIterator::SeekForPrevImpl(const Slice& target,
|
||||
active_.erase(active_.lower_bound(starting_level), active_.end());
|
||||
}
|
||||
|
||||
status_ = Status::OK();
|
||||
IterKey current_search_key;
|
||||
current_search_key.SetInternalKey(target, false /* copy */);
|
||||
// Seek target might change to some range tombstone end key, so
|
||||
@@ -1199,6 +1204,8 @@ bool MergingIterator::SkipPrevDeleted() {
|
||||
if (current->iter.Valid()) {
|
||||
assert(current->iter.status().ok());
|
||||
maxHeap_->push(current);
|
||||
} else {
|
||||
considerStatus(current->iter.status());
|
||||
}
|
||||
|
||||
if (range_tombstone_iters_[current->level] &&
|
||||
@@ -1241,6 +1248,7 @@ bool MergingIterator::SkipPrevDeleted() {
|
||||
if (current->iter.Valid()) {
|
||||
maxHeap_->replace_top(current);
|
||||
} else {
|
||||
considerStatus(current->iter.status());
|
||||
maxHeap_->pop();
|
||||
}
|
||||
return true /* current key deleted */;
|
||||
|
||||
+10
-10
@@ -179,16 +179,16 @@ void GenericRateLimiter::Request(int64_t bytes, const Env::IOPriority pri,
|
||||
// Whichever thread reaches here first performs duty (2) as described
|
||||
// above.
|
||||
RefillBytesAndGrantRequestsLocked();
|
||||
if (r.request_bytes == 0) {
|
||||
// If there is any remaining requests, make sure there exists at least
|
||||
// one candidate is awake for future duties by signaling a front request
|
||||
// of a queue.
|
||||
for (int i = Env::IO_TOTAL - 1; i >= Env::IO_LOW; --i) {
|
||||
std::deque<Req*> queue = queue_[i];
|
||||
if (!queue.empty()) {
|
||||
queue.front()->cv.Signal();
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (r.request_bytes == 0) {
|
||||
// If there is any remaining requests, make sure there exists at least
|
||||
// one candidate is awake for future duties by signaling a front request
|
||||
// of a queue.
|
||||
for (int i = Env::IO_TOTAL - 1; i >= Env::IO_LOW; --i) {
|
||||
auto& queue = queue_[i];
|
||||
if (!queue.empty()) {
|
||||
queue.front()->cv.Signal();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user