-
Notifications
You must be signed in to change notification settings - Fork 72
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
Adding beezcli #427
Adding beezcli #427
Conversation
a469d0d
to
335aca0
Compare
It is possible to review it |
335aca0
to
bf8e845
Compare
examples/speedb_with_ttl_example.cc
Outdated
<< std::endl | ||
<< get_value << std::endl | ||
<< std::endl; | ||
std::cout << "The value returned by db MultiGet before expiration are: " |
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.
pls move it as you did in the Get to after the call MultiGet
examples/speedb_with_ttl_example.cc
Outdated
|
||
s = db->Get(ropts, key1, &get_value); | ||
if (s.IsNotFound()) { | ||
std::cout << "Key has been expired as expected" << std::endl; |
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.
add by Get to the output
examples/speedb_with_ttl_example.cc
Outdated
} | ||
statuses = db->MultiGet(ropts, keys, &values); | ||
for (const auto& i : statuses) { | ||
if (s.IsNotFound()) { |
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.
s??? the for is i...
your test passed cause you used previous s value from the Get...
examples/speedb_with_ttl_example.cc
Outdated
} | ||
} | ||
ropts.skip_expired_data = false; | ||
std::cout << "Keys actually stored but expired by MultiGet, without " |
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.
be consistent - the output after the call as mention above
examples/speedb_with_ttl_example.cc
Outdated
statuses = db->MultiGet(ropts, keys, &values); | ||
for (size_t i = 0; i < statuses.size(); ++i) { | ||
if (statuses[i].ok()) { | ||
std::cout << keys[i].ToStringView() << ":" << values[i] << std::endl; |
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.
dont you want to verify it is the values you are expected too?
utilities/ttl/ttl_test.cc
Outdated
ropts.skip_expired_data = true; | ||
std::vector<std::string> values; | ||
ASSERT_TRUE(db_ttl_->MultiGet(ropts, {"a"}, &values)[0].IsNotFound()); | ||
ASSERT_TRUE(values[0].empty()); |
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.
why you need it... if the MultiGet return not found ofcourse no values...
utilities/ttl/ttl_test.cc
Outdated
CloseTtl(); | ||
} | ||
|
||
TEST_F(TtlTest, DoNotSkipUnExpiredTtlGetTest) { |
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.
do not skip??? you set skip.. . you get the value cause it wasnt expired
utilities/ttl/ttl_test.cc
Outdated
CloseTtl(); | ||
} | ||
|
||
TEST_F(TtlTest, DoNotSkipReadOnlyTtlMultiGetTest) { |
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.
again the name do not skip is not what you set... ropts.skip_expired_data = true;
utilities/ttl/ttl_test.cc
Outdated
CloseTtl(); | ||
} | ||
|
||
TEST_F(TtlTest, DoNotSkipReadOnlyTtlGetTest) { |
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.
as above
utilities/ttl/ttl_test.cc
Outdated
h = nullptr; | ||
} | ||
} | ||
|
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.
you need to add test that do flush/compaction after ttl expired so you see that eventhough you set skip_expired_data=false after flush if you try get the keys were skipped in the flush and werent written to the sst so they wont exist
e5c6fe6
to
840e249
Compare
tools/ldb_cmd.cc
Outdated
@@ -500,7 +516,7 @@ void LDBCommand::OpenDB() { | |||
} | |||
} else { | |||
// We successfully opened DB in single column family mode. | |||
assert(column_families_.empty()); | |||
// assert(column_families_.empty()); |
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.
what to do with this assert
8069dbd
to
103f9de
Compare
@ayulas i added unit test and more comments other than that the code is the same has reviewed |
103f9de
to
384f7f4
Compare
384f7f4
to
941dfe2
Compare
@ayulas added |
beezcli is an interactive tool wrapping ldb This commit adds some enhancement to ldb Resolves: speedb-io#407
941dfe2
to
c37ed78
Compare
added //clang-format off and //clang-format on around #include <stdio.h> otherwise clang-format will try to put stdio after readline which will lead to compilation error in clang |
beezcli is an interactive tool wrapping ldb This commit adds some enhancement to ldb Resolves: #407
beezcli is an interactive tool wrapping ldb This commit adds some enhancement to ldb Resolves: #407
beezcli is an interactive tool wrapping ldb This commit adds some enhancement to ldb Resolves: #407
beezcli is an interactive tool wrapping ldb This commit adds some enhancement to ldb Resolves: #407
beezcli is an interactive tool wrapping ldb This commit adds some enhancement to ldb Resolves: #407
beezcli is an interactive tool wrapping ldb This commit adds some enhancement to ldb Resolves: #407
This Pull request is adding a wrapper around ldb and allow using ldb in interactive manner (it is yet possible to use it non interactive just like ldb).
It adds some new functionalities to ldb such as multiget,
summary of keys and values from dump command, allow to not present values on dump and idump.
Fix the ttl parameter, to allow ttl to get value and run compaction on top of db with ttl.
Resolves: #407