sstables: make read_summary_entry private

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
This commit is contained in:
Glauber Costa
2015-04-28 17:29:25 -04:00
parent 198f55dc5c
commit 34d099dfbf
2 changed files with 7 additions and 3 deletions

View File

@@ -121,6 +121,8 @@ private:
template <typename T>
int binary_search(const T& entries, const key& sk);
future<summary_entry&> read_summary_entry(size_t i);
public:
// Read one or few rows at the given byte range from the data file,
// feeding them into the consumer. This function reads the entire given
@@ -153,8 +155,6 @@ public:
future<> load();
future<> store();
future<summary_entry&> read_summary_entry(size_t i);
void set_generation(unsigned long generation) { _generation = generation; }
// Allow the test cases from sstable_test.cc to test private methods. We use

View File

@@ -58,6 +58,10 @@ public:
return _sst->read_summary();
}
future<summary_entry&> read_summary_entry(size_t i) {
return _sst->read_summary_entry(i);
}
summary& get_summary() {
return _sst->_summary;
}
@@ -207,7 +211,7 @@ SEASTAR_TEST_CASE(composite_index_read_0_21_20) {
template<uint64_t Position, uint64_t EntryPosition, uint64_t EntryKeySize>
future<> summary_query(sstring path, int generation) {
return reusable_sst(path, generation).then([] (sstable_ptr ptr) {
return ptr->read_summary_entry(Position).then([ptr] (auto entry) {
return sstables::test(ptr).read_summary_entry(Position).then([ptr] (auto entry) {
BOOST_REQUIRE(entry.position == EntryPosition);
BOOST_REQUIRE(entry.key.size() == EntryKeySize);
return make_ready_future<>();