Skip to content

Commit

Permalink
tweak after thinking about range queries w/ kupserts for Jun
Browse files Browse the repository at this point in the history
  • Loading branch information
rtjohnso committed Jun 29, 2016
1 parent 31e5e58 commit 8be92ad
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
CXXFLAGS=-Wall -std=c++11 -g -O3
#CXXFLAGS=-Wall -std=c++11 -g -DDEBUG
#CXXFLAGS=-Wall -std=c++11 -g -pg
#CXXFLAGS=-Wall -std=c++11 -g -pg -DDEBUG
CC=g++

test: test.cpp betree.hpp swap_space.o backing_store.o
Expand Down
6 changes: 3 additions & 3 deletions betree.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -586,9 +586,9 @@ template<class Key, class Value> class betree {

std::pair<MessageKey<Key>, Message<Value> >
get_next_message_from_children(const MessageKey<Key> *mkey) const {
auto it = (mkey && pivots.begin()->first < *mkey)
? get_pivot(mkey->key)
: pivots.begin();
if (mkey && *mkey < pivots.begin()->first)
mkey = NULL;
auto it = mkey ? get_pivot(mkey->key) : pivots.begin();
while (it != pivots.end()) {
try {
return it->second.child->get_next_message(mkey);
Expand Down
6 changes: 3 additions & 3 deletions test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ void do_scan(typename betree<Key, Value>::iterator &betit,
assert(betit == b.end());
}

#define DEFAULT_TEST_MAX_NODE_SIZE (1ULL<<4)
#define DEFAULT_TEST_MIN_FLUSH_SIZE (DEFAULT_MAX_NODE_SIZE / 4)
#define DEFAULT_TEST_MAX_NODE_SIZE (1ULL<<6)
#define DEFAULT_TEST_MIN_FLUSH_SIZE (DEFAULT_TEST_MAX_NODE_SIZE / 4)
#define DEFAULT_TEST_CACHE_SIZE (4)
#define DEFAULT_TEST_NDISTINCT_KEYS (1ULL << 10)
#define DEFAULT_TEST_NOPS (1ULL << 12)
Expand Down Expand Up @@ -210,7 +210,7 @@ int main(int argc, char **argv)
{
char *mode = NULL;
uint64_t max_node_size = DEFAULT_TEST_MAX_NODE_SIZE;
uint64_t min_flush_size = max_node_size / 4;
uint64_t min_flush_size = DEFAULT_TEST_MIN_FLUSH_SIZE;
uint64_t cache_size = DEFAULT_TEST_CACHE_SIZE;
char *backing_store_dir = NULL;
uint64_t number_of_distinct_keys = DEFAULT_TEST_NDISTINCT_KEYS;
Expand Down

0 comments on commit 8be92ad

Please sign in to comment.