chore: pull latest helio (#4446)

This also pulls the latest abseil library 20240722.0
This commit is contained in:
Roman Gershman 2025-01-13 15:23:08 +02:00 committed by GitHub
parent 679df5cd81
commit 29cde99ca5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 32 additions and 24 deletions

View file

@ -90,7 +90,12 @@ void User::Update(UpdateRequest&& req, const CategoryToIdxStore& cat_to_id,
void User::SetPasswordHash(std::string_view password, bool is_hashed) {
nopass_ = false;
if (is_hashed) {
password_hashes_.insert(absl::HexStringToBytes(password));
std::string binary;
if (absl::HexStringToBytes(password, &binary)) {
password_hashes_.insert(binary);
} else {
LOG(ERROR) << "Invalid password hash: " << password;
}
return;
}
password_hashes_.insert(StringSHA256(password));

View file

@ -261,7 +261,7 @@ void OutgoingMigration::SyncFb() {
continue;
}
OnAllShards([this](auto& migration) { migration->RunSync(); });
OnAllShards([](auto& migration) { migration->RunSync(); });
if (cntx_.GetError()) {
continue;

View file

@ -35,7 +35,7 @@ template <> string ConCat(const CmdArgList& list) {
struct EntryPayloadVisitor {
void operator()(const Entry::Payload& p) {
out->append(p.cmd).append(" ");
*out += visit([this](const auto& args) { return ConCat(args); }, p.args);
*out += visit([](const auto& args) { return ConCat(args); }, p.args);
}
string* out;

View file

@ -1486,7 +1486,7 @@ void Service::DispatchMC(const MemcacheParser::Command& cmd, std::string_view va
MCReplyBuilder* mc_builder, facade::ConnectionContext* cntx) {
absl::InlinedVector<MutableSlice, 8> args;
char cmd_name[16];
char ttl[16];
char ttl[absl::numbers_internal::kFastToBufferSize];
char store_opt[32] = {0};
char ttl_op[] = "EXAT";

View file

@ -645,7 +645,7 @@ error_code Replica::ConsumeRedisStream() {
}
if (!LastResponseArgs().empty()) {
string_view cmd = absl::CHexEscape(ToSV(LastResponseArgs()[0].GetBuf()));
string cmd = absl::CHexEscape(ToSV(LastResponseArgs()[0].GetBuf()));
// Valkey and Redis may send MULTI and EXEC as part of their replication commands.
// Dragonfly disallows some commands, such as SELECT, inside of MULTI/EXEC, so here we simply

View file

@ -1773,8 +1773,9 @@ void ServerFamily::CancelBlockingOnThread(std::function<OpStatus(ArgSlice)> stat
}
};
for (auto* listener : listeners_)
listener->TraverseConnectionsOnThread(cb);
for (auto* listener : listeners_) {
listener->TraverseConnectionsOnThread(cb, UINT32_MAX, nullptr);
}
}
string GetPassword() {

View file

@ -57,8 +57,8 @@ static vector<string> SplitLines(const std::string& src) {
return res;
}
TestConnection::TestConnection(Protocol protocol, io::StringSink* sink)
: facade::Connection(protocol, nullptr, nullptr, nullptr), sink_(sink) {
TestConnection::TestConnection(Protocol protocol)
: facade::Connection(protocol, nullptr, nullptr, nullptr) {
cc_.reset(new dfly::ConnectionContext(this, {}));
cc_->skip_acl_validation = true;
SetSocket(ProactorBase::me()->CreateSocket());
@ -141,7 +141,7 @@ class BaseFamilyTest::TestConnWrapper {
};
BaseFamilyTest::TestConnWrapper::TestConnWrapper(Protocol proto)
: dummy_conn_(new TestConnection(proto, &sink_)) {
: dummy_conn_(new TestConnection(proto)) {
switch (proto) {
case Protocol::REDIS:
builder_.reset(new RedisReplyBuilder{&sink_});

View file

@ -25,7 +25,7 @@ void TEST_InvalidateLockTagOptions();
class TestConnection : public facade::Connection {
public:
TestConnection(Protocol protocol, io::StringSink* sink);
explicit TestConnection(Protocol protocol);
std::string RemoteEndpointStr() const override;
void SendPubMessageAsync(PubMessage pmsg) final;
@ -44,7 +44,6 @@ class TestConnection : public facade::Connection {
std::vector<InvalidationMessage> invalidate_messages;
private:
io::StringSink* sink_;
bool is_privileged_ = false;
};

View file

@ -1553,7 +1553,7 @@ OpResult<ScoredArray> ZPopMinMaxInternal(std::string_view key, FilterShards shou
}
auto cb = [&](Transaction* t, EngineShard* shard) {
if (!key_shard.has_value() || *key_shard == shard->shard_id()) {
result = std::move(OpPopCount(range_spec, t->GetOpArgs(shard), key));
result = OpPopCount(range_spec, t->GetOpArgs(shard), key);
}
return OpStatus::OK;
};

View file

@ -19,7 +19,7 @@ namespace dfly {
class CommandRegistry;
struct CommandContext;
class Transaction;
class OpArgs;
struct OpArgs;
class ZSetFamily {
public: