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

Robj/indirection support #491

Open
wants to merge 64 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
d8bff81
resume work on infrastructure for indirect keys/values
rtjohnso Aug 6, 2022
4609ce8
clean up and simplify indirect structures and iterator
rtjohnso Aug 7, 2022
cfa2be7
finally have a good design
rtjohnso Aug 22, 2022
dbef100
indirect.[hc] compiles
rtjohnso Aug 23, 2022
22bdb65
rename mini_alloc_multi
rtjohnso Aug 23, 2022
0d6b9e0
added needed functionality to mini_allocator
rtjohnso Aug 23, 2022
ce4482e
iterating on mini_allocator interface changes
rtjohnso Aug 24, 2022
54d608f
starting on a unit test
rtjohnso Aug 24, 2022
a7fa0b0
clean up some unit-test dependencies
rtjohnso Aug 24, 2022
be25007
fix NUM_INDIRECTION_BATCHES
rtjohnso Aug 24, 2022
bc8387c
bugfixes and test of indirection_clone
rtjohnso Aug 25, 2022
eac26c5
got unit tests (and all tests) passing
rtjohnso Aug 27, 2022
f0a4af2
rename indirect to blob
rtjohnso Aug 28, 2022
2e8207e
break blob into two parts to avoid circular dependency w/ mini_allocator
rtjohnso Aug 28, 2022
e31c9cf
add alignment control to blob building
rtjohnso Aug 29, 2022
4fca9d8
plumb blobs through shard_log -- untested
rtjohnso Aug 29, 2022
072ba06
got shard_log test working (w/o new functionality)
rtjohnso Aug 30, 2022
5879c42
Merge remote-tracking branch 'origin/main' into robj/indirection-support
rtjohnso Sep 6, 2022
e92ed83
fix stupid bug
rtjohnso Sep 21, 2022
fdc6910
Merge remote-tracking branch 'origin/main' into robj/indirection-support
rtjohnso Oct 7, 2022
94d4d05
fix cache_alloc/cache_get mess
rtjohnso Oct 8, 2022
a9c7527
more wiring of blobs
rtjohnso Oct 8, 2022
85fe34b
further improvement of blob page iter
rtjohnso Oct 8, 2022
ddffffc
log allocates blobs on page alignment
rtjohnso Oct 10, 2022
f2b16b8
oh my god add missing files
rtjohnso Oct 13, 2022
3dc299d
fix bug in alloc-mode blob iterator
rtjohnso Nov 4, 2022
af00762
fix up shard_log iterator enough for now
rtjohnso Nov 4, 2022
f1a86ac
store cache in message
rtjohnso Nov 4, 2022
cf4ba69
adapt mini_allocator to multiple page-types, start on btree support f…
rtjohnso Nov 6, 2022
ab2e107
btree inserts seem to be working
rtjohnso Nov 20, 2022
6f75f9f
lots of progress
rtjohnso Nov 20, 2022
b825800
fixed missing materialization in functionality test
rtjohnso Nov 22, 2022
b6d5c95
make blob.c respect some of clockcache's restrictions on allocing and…
rtjohnso Nov 22, 2022
f2be52d
mark pages dirty in blob_build.
rtjohnso Nov 22, 2022
caaa021
clean up some gcc errors
rtjohnso Nov 22, 2022
a860277
fix memory leak
rtjohnso Nov 22, 2022
243bec3
fix two stupid bugs
rtjohnso Nov 22, 2022
fba2b92
use correct PAGE_TYPE for blobs in btree.c
rtjohnso Nov 23, 2022
76de089
merge with main
rtjohnso Nov 23, 2022
ba6422b
make btree_pack track materialized bytes, improve randomization of me…
rtjohnso Nov 25, 2022
bd6cb75
typo
rtjohnso Nov 25, 2022
c651ae9
Modify trunk_split_leaf to never split too much and tweaked some tests
rtjohnso Nov 25, 2022
3bb772e
organize data-blob functions
rtjohnso Nov 27, 2022
17d647f
various cleanups
rtjohnso Nov 30, 2022
76fa1c6
formatting
rtjohnso Nov 30, 2022
7bb1570
Merge remote-tracking branch 'origin/main' into robj/indirection-support
rtjohnso Nov 30, 2022
a77c3a5
Merge remote-tracking branch 'origin/main' into robj/indirection-support
rtjohnso Dec 4, 2022
8408a79
merged
rtjohnso Dec 7, 2022
c9003ee
fix a bunch of bugs and finish self review
rtjohnso Dec 14, 2022
326f7bc
formatting
rtjohnso Dec 14, 2022
339d6f9
merge w/ origin/main
rtjohnso Dec 29, 2022
d351978
add assert
rtjohnso Jan 7, 2023
e8bab76
merge main
rtjohnso Jan 7, 2023
38be83c
finish merge
rtjohnso Jan 7, 2023
b7e49d0
Memtable Generation Bugfix
ajhconway Mar 24, 2023
81a9bb4
fix memtable race
rtjohnso Apr 24, 2023
5240e18
clang-format
rtjohnso Apr 24, 2023
ba3a248
merge w/ new main
rtjohnso Apr 25, 2023
173ecf6
Merge remote-tracking branch 'origin/main' into robj/indirection-support
rtjohnso Apr 25, 2023
d6d951b
Merge branch 'main' into robj/indirection-support
rtjohnso Apr 25, 2023
ab5cd48
clang-format
rtjohnso Apr 25, 2023
6316437
Merge remote-tracking branch 'origin/robj/memtable-race-fix' into rob…
rtjohnso Apr 25, 2023
ba3c8c3
shrink some tests so they don't trigger trunk bugs
rtjohnso Apr 25, 2023
9db4655
fix some debug-mode compilation issues
rtjohnso Apr 25, 2023
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
23 changes: 18 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -399,10 +399,15 @@ CLOCKCACHE_SYS = $(OBJDIR)/$(SRCDIR)/clockcache.o \
$(UTIL_SYS) \
$(PLATFORM_IO_SYS)

BLOB_SYS = $(OBJDIR)/$(SRCDIR)/blob.o \
$(OBJDIR)/$(SRCDIR)/blob_build.o \
$(OBJDIR)/$(SRCDIR)/data_internal.o \
$(OBJDIR)/$(SRCDIR)/data_blob_build.o \
$(OBJDIR)/$(SRCDIR)/mini_allocator.o \
$(CLOCKCACHE_SYS)

BTREE_SYS = $(OBJDIR)/$(SRCDIR)/btree.o \
$(OBJDIR)/$(SRCDIR)/data_internal.o \
$(OBJDIR)/$(SRCDIR)/mini_allocator.o \
$(CLOCKCACHE_SYS)
$(BLOB_SYS)

#################################################################
# The dependencies of each mini unit test.
Expand All @@ -415,13 +420,21 @@ $(BINDIR)/$(UNITDIR)/misc_test: $(UTIL_SYS) $(COMMON_UNIT_TESTOBJ)
$(BINDIR)/$(UNITDIR)/util_test: $(UTIL_SYS) \
$(COMMON_UNIT_TESTOBJ)

$(BINDIR)/$(UNITDIR)/btree_test: $(OBJDIR)/$(UNIT_TESTSDIR)/btree_test_common.o \
$(BINDIR)/$(UNITDIR)/blob_test: $(OBJDIR)/$(UNIT_TESTSDIR)/cache_test_common.o \
$(OBJDIR)/$(TESTS_DIR)/config.o \
$(OBJDIR)/$(TESTS_DIR)/test_data.o \
$(COMMON_UNIT_TESTOBJ) \
$(BLOB_SYS)

$(BINDIR)/$(UNITDIR)/btree_test: $(OBJDIR)/$(UNIT_TESTSDIR)/cache_test_common.o \
$(OBJDIR)/$(UNIT_TESTSDIR)/btree_test_common.o \
$(OBJDIR)/$(TESTS_DIR)/config.o \
$(OBJDIR)/$(TESTS_DIR)/test_data.o \
$(COMMON_UNIT_TESTOBJ) \
$(BTREE_SYS)

$(BINDIR)/$(UNITDIR)/btree_stress_test: $(OBJDIR)/$(UNIT_TESTSDIR)/btree_test_common.o \
$(BINDIR)/$(UNITDIR)/btree_stress_test: $(OBJDIR)/$(UNIT_TESTSDIR)/cache_test_common.o \
$(OBJDIR)/$(UNIT_TESTSDIR)/btree_test_common.o \
$(OBJDIR)/$(TESTS_DIR)/config.o \
$(OBJDIR)/$(TESTS_DIR)/test_data.o \
$(COMMON_UNIT_TESTOBJ) \
Expand Down
7 changes: 7 additions & 0 deletions include/splinterdb/data.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ typedef enum message_type {
*/
typedef struct message {
message_type type;
void *cc; // Will always be NULL when passed to user call-backs
slice data;
} message;

Expand All @@ -66,6 +67,12 @@ message_length(message msg)
return slice_length(msg.data);
}

static inline const _Bool
message_isblob(message msg)
{
return msg.cc != NULL;
}

static inline const void *
message_data(message msg)
{
Expand Down
2 changes: 1 addition & 1 deletion include/splinterdb/splinterdb.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ splinterdb_update(const splinterdb *kvsb, slice key, slice delta);
// Lookups

// Size of opaque data required to hold a lookup result
#define SPLINTERDB_LOOKUP_BUFSIZE (6 * sizeof(void *))
#define SPLINTERDB_LOOKUP_BUFSIZE (7 * sizeof(void *))

// A lookup result is stored and parsed from here
//
Expand Down
4 changes: 4 additions & 0 deletions src/allocator.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ typedef uint64 allocator_root_id;
*
* - PAGE_TYPE_LOG : struct shard_log_hdr{} + computed offsets
*
* - PAGE_TYPE_BLOB : raw user data (see blob.c)
*
* - PAGE_TYPE_SUPERBLOCK : struct trunk_super_block{}
* ----------------------------------------------------------------------------
*/
Expand All @@ -52,6 +54,7 @@ typedef enum page_type {
PAGE_TYPE_MEMTABLE,
PAGE_TYPE_FILTER,
PAGE_TYPE_LOG,
PAGE_TYPE_BLOB,
PAGE_TYPE_SUPERBLOCK,
PAGE_TYPE_MISC, // Used mainly as a testing hook, for cache access testing.
NUM_PAGE_TYPES,
Expand All @@ -63,6 +66,7 @@ static const char *const page_type_str[] = {"invalid",
"memtable",
"filter",
"log",
"blob",
"superblock",
"misc"};

Expand Down
Loading