Permalink
Browse files

checkpoint: some work on read/write cursors

  • Loading branch information...
stephentu committed Apr 19, 2013
1 parent 1a93874 commit 7f7ec3bf9917f003dd384918696928b70ccd8cf9
Showing with 479 additions and 364 deletions.
  1. +2 −2 Makefile
  2. +2 −3 benchmarks/tpcc.cc
  3. +1 −1 benchmarks/tpcc.h
  4. +1 −1 macros.h
  5. +0 −281 new-benchmarks/inline_str.h
  6. +1 −1 new-benchmarks/tpcc.h
  7. +145 −0 record/cursor.h
  8. +84 −8 record/encoder.h
  9. +37 −15 {benchmarks → record}/inline_str.h
  10. +90 −26 record/serializer.h
  11. +74 −1 test.cc
  12. +1 −1 txn_btree.cc
  13. +0 −22 varint.cc
  14. +41 −2 varint.h
View
@@ -58,7 +58,9 @@ HEADERS = allocator.h \
ndb_type_traits.h \
prefetch.h \
rcu.h \
record/cursor.h \
record/encoder.h \
record/inline_str.h \
record/serializer.h \
scopedperf.hh \
small_unordered_map.h \
@@ -108,7 +110,6 @@ BENCH_HEADERS = $(HEADERS) \
benchmarks/abstract_ordered_index.h \
benchmarks/bdb_wrapper.h \
benchmarks/bench.h \
benchmarks/inline_str.h \
benchmarks/kvdb_wrapper.h \
benchmarks/kvdb_wrapper_impl.h \
benchmarks/masstree/kvrandom.hh \
@@ -131,7 +132,6 @@ NEWBENCH_HEADERS = $(HEADERS) \
new-benchmarks/abstract_db.h \
new-benchmarks/abstract_ordered_index.h \
new-benchmarks/bench.h \
new-benchmarks/inline_str.h \
new-benchmarks/ndb_database.h \
new-benchmarks/str_arena.h \
new-benchmarks/tpcc.h
View
@@ -1827,8 +1827,7 @@ tpcc_worker::txn_stock_level()
for (auto &p : c.s_i_ids) {
ANON_REGION("StockLevelLoopJoinIter:", &stock_level_probe1_cg);
const serializer<int16_t, true> i16s;
const size_t nbytesread = i16s.max_nbytes();
const size_t nbytesread = serializer<int16_t, true>::max_nbytes();
const stock::key k_s(warehouse_id, p.first);
INVARIANT(p.first >= 1 && p.first <= NumItems());
@@ -1839,7 +1838,7 @@ tpcc_worker::txn_stock_level()
INVARIANT(obj_v.size() <= nbytesread);
const uint8_t *ptr = (const uint8_t *) obj_v.data();
int16_t i16tmp;
ptr = i16s.read(ptr, &i16tmp);
ptr = serializer<int16_t, true>::read(ptr, &i16tmp);
if (i16tmp < int(threshold))
s_i_ids_distinct[p.first] = 1;
}
View
@@ -2,7 +2,7 @@
#define _NDB_BENCH_TPCC_H_
#include "../record/encoder.h"
#include "inline_str.h"
#include "../record/inline_str.h"
#include "../macros.h"
#define CUSTOMER_KEY_FIELDS(x, y) \
View
@@ -10,7 +10,7 @@
//#define DIE_ON_ABORT
//#define TRAP_LARGE_ALLOOCATIONS
#define USE_BUILTIN_MEMFUNCS
//#define CHECK_INVARIANTS
#define CHECK_INVARIANTS
//#define TUPLE_CHECK_KEY
#define USE_SMALL_CONTAINER_OPT
#define BTREE_NODE_ALLOC_CACHE_ALIGNED
View

This file was deleted.

Oops, something went wrong.
View
@@ -4,7 +4,7 @@
#include <memory>
#include "../record/encoder.h"
#include "inline_str.h"
#include "../record/inline_str.h"
#include "../macros.h"
#define CUSTOMER_KEY_FIELDS(x, y) \
Oops, something went wrong.

0 comments on commit 7f7ec3b

Please sign in to comment.