fix(server): Fix a crash when running "client list" command. (#179)

Also, enhance release script to apply linker optimizations when building the binaries.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
This commit is contained in:
Roman Gershman 2022-06-26 17:25:42 +03:00 committed by GitHub
parent 605b1fd217
commit 448d065647
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 4 deletions

View File

@ -290,7 +290,9 @@ string Connection::GetClientInfo() const {
absl::StrAppend(&res, " fd=", lsb->native_handle(), " name=", name_);
absl::StrAppend(&res, " age=", now - creation_time_, " idle=", now - last_interaction_);
absl::StrAppend(&res, " phase=", phase_, " ");
absl::StrAppend(&res, cc_->GetContextInfo());
if (cc_) {
absl::StrAppend(&res, cc_->GetContextInfo());
}
return res;
}

View File

@ -739,10 +739,10 @@ void GenericFamily::Register(CommandRegistry* registry) {
<< CI{"RENAME", CO::WRITE, 3, 1, 2, 1}.HFUNC(Rename)
<< CI{"RENAMENX", CO::WRITE, 3, 1, 2, 1}.HFUNC(RenameNx)
<< CI{"SELECT", kSelectOpts, 2, 0, 0, 0}.HFUNC(Select)
<< CI{"SCAN", CO::READONLY | CO::FAST, -2, 0, 0, 0}.HFUNC(Scan)
<< CI{"SCAN", CO::READONLY | CO::FAST | CO::LOADING, -2, 0, 0, 0}.HFUNC(Scan)
<< CI{"TTL", CO::READONLY | CO::FAST, 2, 1, 1, 1}.HFUNC(Ttl)
<< CI{"PTTL", CO::READONLY | CO::FAST, 2, 1, 1, 1}.HFUNC(Pttl)
<< CI{"TYPE", CO::READONLY | CO::FAST, 2, 1, 1, 1}.HFUNC(Type)
<< CI{"TYPE", CO::READONLY | CO::FAST | CO::LOADING, 2, 1, 1, 1}.HFUNC(Type)
<< CI{"UNLINK", CO::WRITE, -2, 1, -1, 1}.HFUNC(Del);
}

View File

@ -12,7 +12,7 @@ NAME="dragonfly-${ARCH}"
pwd
./helio/blaze.sh -release -DBoost_USE_STATIC_LIBS=ON -DOPENSSL_USE_STATIC_LIBS=ON \
-DENABLE_GIT_VERSION=ON -DWITH_UNWIND=OFF
-DENABLE_GIT_VERSION=ON -DWITH_UNWIND=OFF -DHELIO_RELEASE_FLAGS="-flto"
cd build-opt
ninja dragonfly && ldd dragonfly