Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add transactional ART #2

Open
wants to merge 123 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
123 commits
Select commit Hold shift + click to select a range
42d207e
Add tint with simple increment
zyedidia Jun 5, 2018
b787091
Better increment
zyedidia Jun 6, 2018
252c26b
Minor update
zyedidia Jun 11, 2018
7b67062
Art in progress
zyedidia Jun 12, 2018
da6feb3
Better ART
zyedidia Jun 12, 2018
c2684bd
Not working yet
zyedidia Jun 13, 2018
6207f0c
Use libart ART implementation
zyedidia Jun 14, 2018
41f0ab5
erase support
zyedidia Jun 14, 2018
e9475ab
Better lookup lock
zyedidia Jun 15, 2018
9463fb0
Correct makefile
zyedidia Jun 15, 2018
ba28c82
new TART tests
williamlw999 Jun 15, 2018
854f27c
Update tests
zyedidia Jun 15, 2018
1b4469a
Search returns leaf node
zyedidia Jun 18, 2018
9a38a5d
Per node versions
zyedidia Jun 18, 2018
2016cb4
Small improvements
zyedidia Jun 18, 2018
a566152
Add benchmark
zyedidia Jun 20, 2018
9996123
Small fix
zyedidia Jun 20, 2018
dfe5887
Fix bench
zyedidia Jun 20, 2018
9b9d77e
Start concurrent art
zyedidia Jun 22, 2018
ded1399
Almost finish concurrent art
zyedidia Jun 22, 2018
e103c38
debug
zyedidia Jun 22, 2018
39d2492
Small improvements
zyedidia Jun 22, 2018
d1f9692
Improve types
zyedidia Jun 23, 2018
a23caa6
Use ART benchmark
zyedidia Jun 25, 2018
3f5be42
Concurrent ART
zyedidia Jun 25, 2018
380b26a
Not working per node locking
zyedidia Jun 26, 2018
987e724
Add big lock back
zyedidia Jun 26, 2018
c84787b
Use key-vals for keys
zyedidia Jun 26, 2018
186fb56
Per node locks
zyedidia Jun 26, 2018
07af92e
New tests on keykey-val, many of them fail
williamlw999 Jun 27, 2018
fcb8577
fixed absent vers not updated error causing absent1_2 and 1_1 to fail
williamlw999 Jun 27, 2018
975b0ea
fixed absent vers not updated error causing absent1_2 and 1_1 to fail
williamlw999 Jun 27, 2018
967cdf0
absent 3 also works now, error w/ read only transactions not checking…
williamlw999 Jun 27, 2018
5814b83
Tests pass
zyedidia Jun 27, 2018
b631b98
Improve bench
zyedidia Jun 27, 2018
b5fa390
all tests pass, added inserts to induce chekcs
williamlw999 Jun 27, 2018
fcf4052
Improve install performance
zyedidia Jun 27, 2018
a77484e
Merge
zyedidia Jun 27, 2018
6492a83
Eager inserts
zyedidia Jun 28, 2018
621a843
Fix warnings
zyedidia Jun 28, 2018
c3828a0
TART poison is less poisonous, ABA error detected
williamlw999 Jun 28, 2018
90bcfa0
Update bench
zyedidia Jun 29, 2018
86f5926
Add tart bench
zyedidia Jun 29, 2018
d5f7a16
Fix tart_bench
zyedidia Jun 29, 2018
b08e15e
Poison
zyedidia Jun 29, 2018
afe2ce6
Add insert success bool
zyedidia Jun 29, 2018
cb7205c
Fix duplicate inserts
zyedidia Jun 29, 2018
d628b32
Start per node absent versions
zyedidia Jul 1, 2018
b78a69c
Per node absent
zyedidia Jul 2, 2018
5697ca8
Fix cleanup bug
zyedidia Jul 2, 2018
52909b2
fixes to tests
williamlw999 Jul 3, 2018
5438179
Add multi items
zyedidia Jul 3, 2018
51cd2f9
merged
williamlw999 Jul 3, 2018
48c20a8
Fix bug
zyedidia Jul 3, 2018
4732491
fixed tests
williamlw999 Jul 3, 2018
f8b0cea
Merge branch 'per-node-absent' of https://github.com/zyedidia/sto int…
williamlw999 Jul 3, 2018
75bafa2
new test absent 3
williamlw999 Jul 3, 2018
a2cb88e
testabsent 3 is actually new now and should work
williamlw999 Jul 3, 2018
d3858d2
more absent 3's
williamlw999 Jul 3, 2018
ab72d88
Update tests
zyedidia Jul 3, 2018
d3feccc
new strs
williamlw999 Jul 3, 2018
f9e9ecb
Merge branch 'per-node-absent' of https://github.com/zyedidia/sto int…
williamlw999 Jul 3, 2018
9210b7a
test node size increases don't mess up parent
williamlw999 Jul 3, 2018
ebda46b
Minor update
zyedidia Jul 3, 2018
23a44ce
Add erase
zyedidia Jul 3, 2018
3e6e11a
Fixed rule for ART
wqian94 Jul 3, 2018
3edc0a4
Parent bit
zyedidia Jul 3, 2018
a0ae0d8
preliminary print function in Tree.cpp, incomplete
williamlw999 Jul 3, 2018
7080583
Better print, key terminators, new bench
zyedidia Jul 5, 2018
fe96ace
tree print displays full prefix
williamlw999 Jul 5, 2018
9b64f3f
minor styling
williamlw999 Jul 5, 2018
16d373d
Add rcu delete
zyedidia Jul 6, 2018
d097b2f
remove libart
zyedidia Jul 6, 2018
ec4228b
Random keys
zyedidia Jul 9, 2018
22ace74
Improve bench
zyedidia Jul 9, 2018
c626a73
Correct erase
zyedidia Jul 9, 2018
8f6ef77
Masstree
zyedidia Jul 9, 2018
610c0e9
Use cmdline args for benchmark
zyedidia Jul 10, 2018
94a5fbe
Add lookup to masstree bench
zyedidia Jul 10, 2018
5b26d2e
Improve erase performance
zyedidia Jul 11, 2018
8f2813f
new test insert delete, it fails!
williamlw999 Jul 11, 2018
e16d63d
Fix insert delete issue
zyedidia Jul 11, 2018
ddc711e
Add remove to masstree bench
zyedidia Jul 12, 2018
8ab0e99
Merge branch 'masstree'
zyedidia Jul 12, 2018
5946fc7
Start faster keys
zyedidia Jul 12, 2018
acac61d
Correctness
zyedidia Jul 13, 2018
596f717
Fix cleanup and bench masstree with random keys
zyedidia Jul 13, 2018
8986daa
Start lookuprange
zyedidia Jul 16, 2018
5918d20
More stuff
zyedidia Jul 16, 2018
3a436eb
Add RCU
zyedidia Jul 16, 2018
d034960
Make keys pairs
zyedidia Jul 16, 2018
3ba50e3
Merge branch 'lookuprange'
zyedidia Jul 16, 2018
b46528d
Add support for lookup range
zyedidia Jul 16, 2018
3fbc0d8
Small cleanup
zyedidia Jul 17, 2018
ab74350
New insert with lambda
zyedidia Jul 19, 2018
dc3f7fc
Add rcu test and fix warnings
zyedidia Jul 19, 2018
75f043f
Fix lookup range
zyedidia Jul 19, 2018
d71e85f
Update lookup test
zyedidia Jul 19, 2018
53d5d57
Bench transactional masstree
zyedidia Jul 20, 2018
49a1d93
Working voter benchmark
zyedidia Jul 23, 2018
e1ee88e
Some updates
zyedidia Jul 25, 2018
fec7850
Add more overloaded functions
zyedidia Jul 26, 2018
5e2d6a0
Fix errors
zyedidia Jul 26, 2018
373010b
Fix split and upgrade bugs
zyedidia Jul 27, 2018
90c0a0c
fix split tests, found bugs
williamlw999 Jul 30, 2018
bfb7220
Fix some annoying bugs
zyedidia Jul 30, 2018
ae43297
All tests pass
zyedidia Jul 30, 2018
da361e8
Fix some bugs
zyedidia Jul 30, 2018
715db42
Add a new test
zyedidia Jul 30, 2018
b7c8f43
Add small bank benchmark
zyedidia Jul 31, 2018
068fd99
Improve tart bank
zyedidia Aug 1, 2018
5755050
Fix opacity bug with TART
zyedidia Aug 1, 2018
d5f5793
Fix masstree update
zyedidia Aug 1, 2018
4dfd865
Add art_index
zyedidia Aug 2, 2018
a0e3aed
Remove TOpaqueWrapped
zyedidia Aug 2, 2018
42cf27b
Add unit-artindex
zyedidia Aug 2, 2018
d8dc335
Fix YCSB and add some unit-artindex tests
zyedidia Aug 2, 2018
791d5d9
Update unit-artindex: todo implement changing internode versions
zyedidia Aug 3, 2018
ca32728
Minor update to ycsb
zyedidia Aug 3, 2018
e5dae2e
Merge branch 'master' of https://github.com/zyedidia/sto
zyedidia Aug 3, 2018
3cc9851
Fix parent version change bug
zyedidia Aug 3, 2018
d6f98f9
Fix upgrade and downgrade bugs
zyedidia Aug 3, 2018
e94b659
Fix some problems
zyedidia Aug 3, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@
/pqVsIt
/ex-counter
/unit-rcu
/unit-dboindex
/unit-tint
/unit-tart
/bench-tart
/bench-masstree
/tart_bench
/unit-tarray
/unit-tbox
/unit-tgeneric
Expand All @@ -47,7 +53,7 @@
/unit-sampling
/unit-tflexarray
/tpcc_bench
/ycsb_bench
/*ycsb_bench
/micro_bench
/wiki_bench
/voter_bench
Expand All @@ -60,3 +66,6 @@
**/.idea/workspace.xml
**/.idea/tasks.xml
**/cmake-build-*
/tart-bank
/art_micro_bench
/unit-artindex
122 changes: 122 additions & 0 deletions ART/Key.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
#pragma once
#ifndef ART_KEY_H
#define ART_KEY_H

#include <stdint.h>
#include <cstring>
#include <memory>
#include <assert.h>

using KeyLen = uint32_t;

class Key {
static constexpr uint32_t stackLen = 128;
uint32_t len = 0;


public:
uint8_t stackKey[stackLen];
uint8_t *data;

Key() {}

~Key();

Key(const Key &key) = delete;

Key(Key &&key);

void set(const char bytes[], const std::size_t length);

void operator=(const char key[]);

bool operator==(const Key &k) const {
if (k.getKeyLen() != getKeyLen()) {
return false;
}
return std::memcmp(&k[0], data, getKeyLen()) == 0;
}

uint8_t &operator[](std::size_t i);

const uint8_t &operator[](std::size_t i) const;

KeyLen getKeyLen() const;

void setKeyLen(KeyLen len);

};


inline uint8_t &Key::operator[](std::size_t i) {
assert(i < len);
return data[i];
}

inline const uint8_t &Key::operator[](std::size_t i) const {
assert(i < len);
return data[i];
}

inline KeyLen Key::getKeyLen() const { return len; }

inline Key::~Key() {
if (len > stackLen) {
delete[] data;
data = nullptr;
}
}

inline Key::Key(Key &&key) {
len = key.len;
if (len > stackLen) {
data = key.data;
key.data = nullptr;
} else {
memcpy(stackKey, key.stackKey, key.len);
data = stackKey;
}
}

inline void Key::set(const char bytes[], const std::size_t length) {
if (len > stackLen) {
delete[] data;
}
if (length <= stackLen) {
memcpy(stackKey, bytes, length);
data = stackKey;
} else {
data = new uint8_t[length];
memcpy(data, bytes, length);
}
len = length;
}

inline void Key::operator=(const char key[]) {
if (len > stackLen) {
delete[] data;
}
len = strlen(key);
if (len <= stackLen) {
memcpy(stackKey, key, len);
data = stackKey;
} else {
data = new uint8_t[len];
memcpy(data, key, len);
}
}

inline void Key::setKeyLen(KeyLen newLen) {
if (len == newLen) return;
if (len > stackLen) {
delete[] data;
}
len = newLen;
if (len > stackLen) {
data = new uint8_t[len];
} else {
data = stackKey;
}
}

#endif // ART_KEY_H
Loading