-
Notifications
You must be signed in to change notification settings - Fork 312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: use rocksdb_wrapper::get to reimplement incr #651
Conversation
src/server/rocksdb_wrapper.h
Outdated
struct db_get_context; | ||
class pegasus_server_impl; | ||
|
||
static constexpr int FAIL_DB_GET = -104; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you define it in cpp?
And what does '-104' mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It it internal error codes used for fail injection, and there are three other error codes defined in pegasus_write_service_impl.h
:
static constexpr int FAIL_DB_WRITE_BATCH_PUT = -101;
static constexpr int FAIL_DB_WRITE_BATCH_DELETE = -102;
static constexpr int FAIL_DB_WRITE = -103;
I think 104
has no special meaning. And I don't want to change it, because it is not the main purpose for this pull reqeust.
What problem does this PR solve?
rocksdb_wrapper
to wrap the operation of rocksdb, and putdb_get
into it.rocksdb_wrapper::get
to reimplement incr function.Check List
Tests