Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
QuarkDB
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
eos
QuarkDB
Commits
dc26522a
Commit
dc26522a
authored
8 years ago
by
Georgios Bitzes
Browse files
Options
Downloads
Patches
Plain Diff
Add support for 'DEBUG SEGFAULT'
parent
29db5269
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/Commands.cc
+1
-0
1 addition, 0 deletions
src/Commands.cc
src/Commands.hh
+2
-0
2 additions, 0 deletions
src/Commands.hh
src/Dispatcher.cc
+8
-0
8 additions, 0 deletions
src/Dispatcher.cc
with
11 additions
and
0 deletions
src/Commands.cc
+
1
−
0
View file @
dc26522a
...
@@ -32,6 +32,7 @@ std::map<std::string,
...
@@ -32,6 +32,7 @@ std::map<std::string,
struct
cmdMapInit
{
struct
cmdMapInit
{
cmdMapInit
()
{
cmdMapInit
()
{
redis_cmd_map
[
"ping"
]
=
{
RedisCommand
::
PING
,
CommandType
::
CONTROL
};
redis_cmd_map
[
"ping"
]
=
{
RedisCommand
::
PING
,
CommandType
::
CONTROL
};
redis_cmd_map
[
"debug"
]
=
{
RedisCommand
::
DEBUG
,
CommandType
::
CONTROL
};
redis_cmd_map
[
"get"
]
=
{
RedisCommand
::
GET
,
CommandType
::
READ
};
redis_cmd_map
[
"get"
]
=
{
RedisCommand
::
GET
,
CommandType
::
READ
};
redis_cmd_map
[
"exists"
]
=
{
RedisCommand
::
EXISTS
,
CommandType
::
READ
};
redis_cmd_map
[
"exists"
]
=
{
RedisCommand
::
EXISTS
,
CommandType
::
READ
};
...
...
This diff is collapsed.
Click to expand it.
src/Commands.hh
+
2
−
0
View file @
dc26522a
...
@@ -30,6 +30,8 @@ namespace quarkdb {
...
@@ -30,6 +30,8 @@ namespace quarkdb {
enum
class
RedisCommand
{
enum
class
RedisCommand
{
PING
,
PING
,
DEBUG
,
FLUSHALL
,
FLUSHALL
,
GET
,
GET
,
...
...
This diff is collapsed.
Click to expand it.
src/Dispatcher.cc
+
8
−
0
View file @
dc26522a
...
@@ -45,6 +45,14 @@ LinkStatus RedisDispatcher::dispatch(Connection *conn, RedisRequest &request, Re
...
@@ -45,6 +45,14 @@ LinkStatus RedisDispatcher::dispatch(Connection *conn, RedisRequest &request, Re
return
conn
->
string
(
request
[
1
]);
return
conn
->
string
(
request
[
1
]);
}
}
case
RedisCommand
::
DEBUG
:
{
if
(
request
.
size
()
!=
2
)
return
conn
->
errArgs
(
request
[
0
]);
if
(
request
[
1
]
==
"segfault"
||
request
[
1
]
==
"SEGFAULT"
)
{
*
(
(
int
*
)
nullptr
)
=
5
;
// bye bye
}
return
conn
->
err
(
SSTR
(
"unknown argument '"
<<
request
[
1
]
<<
"'"
));
}
case
RedisCommand
::
FLUSHALL
:
{
case
RedisCommand
::
FLUSHALL
:
{
if
(
request
.
size
()
!=
1
)
return
conn
->
errArgs
(
request
[
0
]);
if
(
request
.
size
()
!=
1
)
return
conn
->
errArgs
(
request
[
0
]);
rocksdb
::
Status
st
=
store
.
flushall
();
rocksdb
::
Status
st
=
store
.
flushall
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment