1
0
Fork 0
mirror of https://github.com/dragonflydb/dragonfly.git synced 2024-12-14 11:58:02 +00:00

fix: out of bounds typo (#1434)

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
This commit is contained in:
Roman Gershman 2023-06-19 13:12:48 +03:00 committed by GitHub
parent 14e9ba4849
commit 3d651aecf5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View file

@ -605,6 +605,10 @@ TEST_F(DflyEngineTest, Issue752) {
ASSERT_THAT(resp.GetVec(), ElementsAre(IntArg(0), IntArg(0)));
}
TEST_F(DflyEngineTest, Latency) {
Run({"latency", "latest"});
}
// TODO: to test transactions with a single shard since then all transactions become local.
// To consider having a parameter in dragonfly engine controlling number of shards
// unconditionally from number of cpus. TO TEST BLPOP under multi for single/multi argument case.

View file

@ -2041,7 +2041,7 @@ void ServerFamily::LastSave(CmdArgList args, ConnectionContext* cntx) {
void ServerFamily::Latency(CmdArgList args, ConnectionContext* cntx) {
ToUpper(&args[0]);
string_view sub_cmd = ArgS(args, 01);
string_view sub_cmd = ArgS(args, 0);
if (sub_cmd == "LATEST") {
return (*cntx)->SendEmptyArray();