Adding beezcli#427
Conversation
a469d0d to
335aca0
Compare
|
It is possible to review it |
335aca0 to
bf8e845
Compare
| << 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.
pls move it as you did in the Get to after the call MultiGet
|
|
||
| s = db->Get(ropts, key1, &get_value); | ||
| if (s.IsNotFound()) { | ||
| std::cout << "Key has been expired as expected" << std::endl; |
| } | ||
| statuses = db->MultiGet(ropts, keys, &values); | ||
| for (const auto& i : statuses) { | ||
| if (s.IsNotFound()) { |
There was a problem hiding this comment.
s??? the for is i...
your test passed cause you used previous s value from the Get...
| } | ||
| } | ||
| ropts.skip_expired_data = false; | ||
| std::cout << "Keys actually stored but expired by MultiGet, without " |
There was a problem hiding this comment.
be consistent - the output after the call as mention above
| 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.
dont you want to verify it is the values you are expected too?
| 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.
why you need it... if the MultiGet return not found ofcourse no values...
| CloseTtl(); | ||
| } | ||
|
|
||
| TEST_F(TtlTest, DoNotSkipUnExpiredTtlGetTest) { |
There was a problem hiding this comment.
do not skip??? you set skip.. . you get the value cause it wasnt expired
| CloseTtl(); | ||
| } | ||
|
|
||
| TEST_F(TtlTest, DoNotSkipReadOnlyTtlMultiGetTest) { |
There was a problem hiding this comment.
again the name do not skip is not what you set... ropts.skip_expired_data = true;
| CloseTtl(); | ||
| } | ||
|
|
||
| TEST_F(TtlTest, DoNotSkipReadOnlyTtlGetTest) { |
| h = nullptr; | ||
| } | ||
| } | ||
|
|
There was a problem hiding this comment.
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
| } 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.
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