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
8555f778
Commit
8555f778
authored
Sep 20, 2019
by
Georgios Bitzes
Browse files
Make ConfigurationReader able to handle leading whitespace
parent
2ea575b8
Pipeline
#1105238
passed with stages
in 61 minutes and 25 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CHANGELOG.md
View file @
8555f778
...
...
@@ -3,10 +3,11 @@
## Unreleased
### Bug fixes
-
``
deque-scan-back
``
was returning the wrong cursor to signal end of
-
``
DEQUE-SCAN-BACK
``
was returning the wrong cursor to signal end of
iteration:
``next:0``
while it should have been
``0``
.
-
A race condition was sometimes causing elections to fail spuriously, making
the election of a stable leader to require slightly more rounds than it should have.
-
A race condition was sometimes causing elections to fail spuriously.
Establishing a stable quorum would occasionally require slightly more election
rounds than it should have.
### New features
-
Implementation of health indicators through
``QUARKDB-HEALTH``
command.
...
...
@@ -20,21 +21,20 @@ on locality hint.
-
Add
``RECOVERY-SCAN``
command for scanning through complete keyspace, including
internal rocksdb keys.
-
Add tool
``quarkdb-sst-inspect``
to allow low-level inspection of SST files.
-
Add command
``RAFT-JOURNAL-SCAN``
to make searching through the contents of the
raft journal easier.
### Improvements
-
Protection for a strange case of corruption which brought down a development
test cluster. (last-applied jumped ahead of commit-index by 1024, causing all
writes to stall). From now on, similar kind of corruption should only take out
a single node, and not spread to the entire cluster.
-
Add command
``RAFT-JOURNAL-SCAN``
to make searching through the contents of the
raft journal easier.
-
``KEYS``
is now implemented in terms of
``SCAN``
, making prefix matching of the
keyspace just as efficient as with
``SCAN``
. (Note: The use of
``KEYS``
is still
generally discouraged due to potentially huge response size)
-
Removed unused tool
``quarkdb-scrub``
.
## 0.3.8 (2019-05-27)
-
Prevent elections from hanging on the TCP timeout when one of the member hosts
is dropping packets, which could bring down an otherwise healthy cluster.
...
...
src/config/ConfigurationReader.cc
View file @
8555f778
...
...
@@ -57,6 +57,15 @@ std::string ConfigurationReader::getCurrentWord() const {
return
ss
.
str
();
}
//------------------------------------------------------------------------------
// Advance to next word, if we're currently sitting on whitespace
//------------------------------------------------------------------------------
void
ConfigurationReader
::
advanceWordIfOnWhitespace
()
{
if
(
!
mContents
.
empty
()
&&
isspace
(
mContents
[
mPosition
]))
{
advanceWord
();
}
}
//------------------------------------------------------------------------------
// Advance to next word
//------------------------------------------------------------------------------
...
...
@@ -73,6 +82,7 @@ void ConfigurationReader::advanceLine() {
mPosition
++
;
if
(
mContents
[
mPosition
]
==
'\n'
)
{
mPosition
++
;
advanceWordIfOnWhitespace
();
break
;
}
}
...
...
src/config/ConfigurationReader.hh
View file @
8555f778
...
...
@@ -69,7 +69,10 @@ private:
//----------------------------------------------------------------------------
size_t
findNextNonWhitespace
()
const
;
//----------------------------------------------------------------------------
// Advance to next word, if we're currently sitting on whitespace
//----------------------------------------------------------------------------
void
advanceWordIfOnWhitespace
();
std
::
string
mContents
;
size_t
mPosition
=
0
;
...
...
test/configuration.cc
View file @
8555f778
...
...
@@ -32,7 +32,7 @@ TEST(ConfigurationReader, BasicSanity) {
"if exec xrootd
\n
"
"xrd.protocol redis:7776 libXrdQuarkDB.so
\n
"
"redis.mode raft
\n
"
"redis.database /home/user/mydb
\n
"
"
redis.database /home/user/mydb
\n
"
"redis.myself server1:7776
\n
"
"redis.trace debug
\n
"
"redis.write_ahead_log true
\n
"
...
...
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