Skip to content

Commit

Permalink
sstables: make read_summary_entry private
Browse files Browse the repository at this point in the history
Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
  • Loading branch information
glommer committed Apr 29, 2015
1 parent 198f55d commit 34d099d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions sstables/sstables.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion tests/urchin/sstable_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ class test {
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;
}
Expand Down Expand Up @@ -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<>();
Expand Down

0 comments on commit 34d099d

Please sign in to comment.