|
@ -257,6 +257,9 @@ void DBImpl::RemoveObsoleteFiles() { |
|
|
case kTableFile: |
|
|
case kTableFile: |
|
|
keep = (live.find(number) != live.end()); |
|
|
keep = (live.find(number) != live.end()); |
|
|
break; |
|
|
break; |
|
|
|
|
|
case kVTableFile: |
|
|
|
|
|
keep = (live.find(number) != live.end()); |
|
|
|
|
|
break; |
|
|
case kTempFile: |
|
|
case kTempFile: |
|
|
// Any temp files that are currently being written to must
|
|
|
// Any temp files that are currently being written to must
|
|
|
// be recorded in pending_outputs_, which is inserted into "live"
|
|
|
// be recorded in pending_outputs_, which is inserted into "live"
|
|
@ -1153,8 +1156,12 @@ Status DBImpl::Get(const ReadOptions& options, const Slice& key, |
|
|
s = current->Get(options, lkey, value, &stats); |
|
|
s = current->Get(options, lkey, value, &stats); |
|
|
have_stat_update = true; |
|
|
have_stat_update = true; |
|
|
} |
|
|
} |
|
|
auto fields = Fields(Slice(*value)); |
|
|
|
|
|
*value = fields["1"]; |
|
|
|
|
|
|
|
|
if (s.ok()) { |
|
|
|
|
|
auto fields = Fields(Slice(*value)); |
|
|
|
|
|
*value = fields["1"]; |
|
|
|
|
|
} else { |
|
|
|
|
|
*value = ""; |
|
|
|
|
|
} |
|
|
mutex_.Lock(); |
|
|
mutex_.Lock(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -1203,7 +1210,11 @@ Status DBImpl::Get(const ReadOptions& options, const Slice& key, |
|
|
s = current->Get(options, lkey, value, &stats); |
|
|
s = current->Get(options, lkey, value, &stats); |
|
|
have_stat_update = true; |
|
|
have_stat_update = true; |
|
|
} |
|
|
} |
|
|
*fields = Fields(Slice(*value)); |
|
|
|
|
|
|
|
|
if (s.ok()) { |
|
|
|
|
|
*fields = Fields(Slice(*value)); |
|
|
|
|
|
} else { |
|
|
|
|
|
*fields = Fields(); |
|
|
|
|
|
} |
|
|
mutex_.Lock(); |
|
|
mutex_.Lock(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|