@@ -221,7 +221,7 @@ void GetContext::ReportCounters() {
221
221
222
222
bool GetContext::SaveValue (const ParsedInternalKey& parsed_key,
223
223
const Slice& value, bool * matched,
224
- Cleanable* value_pinner) {
224
+ Status* read_status, Cleanable* value_pinner) {
225
225
assert (matched);
226
226
assert ((state_ != kMerge && parsed_key.type != kTypeMerge ) ||
227
227
merge_context_ != nullptr );
@@ -356,8 +356,8 @@ bool GetContext::SaveValue(const ParsedInternalKey& parsed_key,
356
356
// merge_context_->operand_list
357
357
if (type == kTypeBlobIndex ) {
358
358
PinnableSlice pin_val;
359
- if (GetBlobValue (parsed_key.user_key , unpacked_value, &pin_val) ==
360
- false ) {
359
+ if (GetBlobValue (parsed_key.user_key , unpacked_value, &pin_val,
360
+ read_status) == false ) {
361
361
return false ;
362
362
}
363
363
Slice blob_value (pin_val);
@@ -383,8 +383,8 @@ bool GetContext::SaveValue(const ParsedInternalKey& parsed_key,
383
383
assert (merge_operator_ != nullptr );
384
384
if (type == kTypeBlobIndex ) {
385
385
PinnableSlice pin_val;
386
- if (GetBlobValue (parsed_key.user_key , unpacked_value, &pin_val) ==
387
- false ) {
386
+ if (GetBlobValue (parsed_key.user_key , unpacked_value, &pin_val,
387
+ read_status) == false ) {
388
388
return false ;
389
389
}
390
390
Slice blob_value (pin_val);
@@ -547,14 +547,14 @@ void GetContext::MergeWithWideColumnBaseValue(const Slice& entity) {
547
547
}
548
548
549
549
bool GetContext::GetBlobValue (const Slice& user_key, const Slice& blob_index,
550
- PinnableSlice* blob_value) {
550
+ PinnableSlice* blob_value, Status* read_status ) {
551
551
constexpr FilePrefetchBuffer* prefetch_buffer = nullptr ;
552
552
constexpr uint64_t * bytes_read = nullptr ;
553
553
554
- Status status = blob_fetcher_->FetchBlob (
555
- user_key, blob_index, prefetch_buffer, blob_value, bytes_read);
556
- if (!status. ok ()) {
557
- if (status. IsIncomplete ()) {
554
+ *read_status = blob_fetcher_->FetchBlob (user_key, blob_index, prefetch_buffer,
555
+ blob_value, bytes_read);
556
+ if (!read_status-> ok ()) {
557
+ if (read_status-> IsIncomplete ()) {
558
558
// FIXME: this code is not covered by unit tests
559
559
MarkKeyMayExist ();
560
560
return false ;
@@ -577,9 +577,9 @@ void GetContext::push_operand(const Slice& value, Cleanable* value_pinner) {
577
577
}
578
578
}
579
579
580
- void replayGetContextLog (const Slice& replay_log, const Slice& user_key,
581
- GetContext* get_context, Cleanable* value_pinner,
582
- SequenceNumber seq_no) {
580
+ Status replayGetContextLog (const Slice& replay_log, const Slice& user_key,
581
+ GetContext* get_context, Cleanable* value_pinner,
582
+ SequenceNumber seq_no) {
583
583
Slice s = replay_log;
584
584
Slice ts;
585
585
size_t ts_sz = get_context->TimestampSize ();
@@ -610,8 +610,13 @@ void replayGetContextLog(const Slice& replay_log, const Slice& user_key,
610
610
611
611
(void )ret;
612
612
613
- get_context->SaveValue (ikey, value, &dont_care, value_pinner);
613
+ Status read_status;
614
+ get_context->SaveValue (ikey, value, &dont_care, &read_status, value_pinner);
615
+ if (!read_status.ok ()) {
616
+ return read_status;
617
+ }
614
618
}
619
+ return Status::OK ();
615
620
}
616
621
617
622
} // namespace ROCKSDB_NAMESPACE
0 commit comments