server(tiering): load data on read (#2415)

* server(tiering): load data on read

Signed-off-by: adi_holden <adi@dragonflydb.io>
This commit is contained in:
adiholden 2024-01-17 16:13:56 +02:00 committed by GitHub
parent 8eda8226b2
commit 9f3b118b87
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 401 additions and 231 deletions

View file

@ -782,7 +782,7 @@ void CompactObj::SetJson(JsonType&& j) {
void CompactObj::SetString(std::string_view str) {
uint8_t mask = mask_ & ~kEncMask;
CHECK(!IsExternal());
// Trying auto-detection heuristics first.
if (str.size() <= 20) {
long long ival;
@ -853,6 +853,7 @@ void CompactObj::SetString(std::string_view str) {
}
string_view CompactObj::GetSlice(string* scratch) const {
CHECK(!IsExternal());
uint8_t is_encoded = mask_ & kEncMask;
if (IsInline()) {
@ -958,6 +959,7 @@ void __attribute__((noinline)) CompactObj::GetString(string* res) const {
}
void CompactObj::GetString(char* dest) const {
CHECK(!IsExternal());
uint8_t is_encoded = mask_ & kEncMask;
if (IsInline()) {