Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
eos
QuarkDB
Commits
8ad0d6fb
Commit
8ad0d6fb
authored
May 08, 2019
by
Georgios Bitzes
Browse files
Prevent crashing when LHSCAN is provided with a cursor missing the field component
parent
fe1b02f1
Pipeline
#856032
passed with stages
in 40 minutes
Changes
3
Pipelines
7
Hide whitespace changes
Inline
Side-by-side
CHANGELOG.md
View file @
8ad0d6fb
# Changelog
All notable changes to this project will be documented in this file.
## Unreleased
-
Prevent crashing when
``LHSCAN``
is provided with a cursor missing the field
component.
## 0.3.7 (2019-04-24)
-
Heavy use of lease commands could cause performance degradation and latency
spikes, due to accumulation of long-lived deletion tombstones on expiration
...
...
src/storage/KeyLocators.hh
View file @
8ad0d6fb
...
...
@@ -193,7 +193,6 @@ public:
}
void
resetField
(
std
::
string_view
field
)
{
qdb_assert
(
!
field
.
empty
());
qdb_assert
(
localityPrefixSize
!=
0
);
keyBuffer
.
shrink
(
localityPrefixSize
);
...
...
test/e2e.cc
View file @
8ad0d6fb
...
...
@@ -1550,6 +1550,7 @@ TEST_F(Raft_e2e, LocalityHash) {
replies
.
emplace_back
(
tunnel
(
leaderID
)
->
exec
(
"lhscan"
,
"mykey"
,
"0"
));
replies
.
emplace_back
(
tunnel
(
leaderID
)
->
exec
(
"lhscan"
,
"mykey"
,
"0"
,
"COUNT"
,
"2"
));
replies
.
emplace_back
(
tunnel
(
leaderID
)
->
exec
(
"lhscan"
,
"mykey"
,
"next:hint3##f1"
,
"COUNT"
,
"2"
));
replies
.
emplace_back
(
tunnel
(
leaderID
)
->
exec
(
"lhscan"
,
"mykey"
,
"next:hint3##"
,
"COUNT"
,
"5"
));
ASSERT_REPLY_DESCRIBE
(
replies
[
0
],
"1)
\"
0
\"\n
"
...
...
@@ -1581,6 +1582,13 @@ TEST_F(Raft_e2e, LocalityHash) {
" 3)
\"
v3
\"\n
"
);
ASSERT_REPLY_DESCRIBE
(
replies
[
3
],
"1)
\"
0
\"\n
"
"2) 1)
\"
hint3
\"\n
"
" 2)
\"
f1
\"\n
"
" 3)
\"
v3
\"\n
"
);
// Now test with evil characters, too
replies
.
clear
();
replies
.
emplace_back
(
tunnel
(
leaderID
)
->
exec
(
"lhset"
,
"my#key"
,
"f#1"
,
"hint#1"
,
"v1"
));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment