mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 10:25:47 +02:00
feat(server): Update helio, optimize and clean up rdb/snapshot (#625)
This commit is contained in:
parent
7788600c9b
commit
443ab9587d
10 changed files with 88 additions and 87 deletions
|
@ -32,16 +32,12 @@ base::IoBuf& JournalWriter::Accumulated() {
|
|||
void JournalWriter::Write(uint64_t v) {
|
||||
uint8_t buf[10];
|
||||
unsigned len = WritePackedUInt(v, buf);
|
||||
buf_.EnsureCapacity(sizeof(buf));
|
||||
memcpy(buf_.AppendBuffer().data(), buf, len);
|
||||
buf_.CommitWrite(len);
|
||||
buf_.WriteAndCommit(buf, len);
|
||||
}
|
||||
|
||||
void JournalWriter::Write(std::string_view sv) {
|
||||
Write(sv.size());
|
||||
buf_.EnsureCapacity(sv.size());
|
||||
memcpy(buf_.AppendBuffer().data(), sv.data(), sv.size());
|
||||
buf_.CommitWrite(sv.size());
|
||||
buf_.WriteAndCommit(sv.data(), sv.size());
|
||||
}
|
||||
|
||||
void JournalWriter::Write(CmdArgList args) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue