mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 18:35:46 +02:00
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:
parent
8eda8226b2
commit
9f3b118b87
13 changed files with 401 additions and 231 deletions
|
@ -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()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue