Skip to content
This repository was archived by the owner on Mar 22, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "src/engines-experimental/pskiplist"]
path = src/engines-experimental/pskiplist
url = https://github.com/4paradigm/pskiplist.git
29 changes: 29 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ option(ENGINE_RADIX "enable experimental radix engine" OFF)
option(ENGINE_ROBINHOOD "enable experimental robinhood engine (requires CXX_STANDARD to be set to value >= 14)" OFF)
option(ENGINE_DRAM_VCMAP "enable testing dram_vcmap engine" OFF)

option(ENGINE_PSKIPLIST "enable experimental pskiplist engine" OFF)

# ----------------------------------------------------------------- #
## Set required and useful variables
# ----------------------------------------------------------------- #
Expand Down Expand Up @@ -140,6 +142,27 @@ if(ENGINE_RADIX)
src/engines-experimental/radix.cc
)
endif()
# checkout submodule for ENGINE_PSKIPLIST
find_package(Git QUIET)
option(GIT_SUBMODULE "Check submodules during build" ON)
if(GIT_SUBMODULE)
message(STATUS "Submodule update for ENGINE_PSKIPLIST")
execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
RESULT_VARIABLE GIT_SUBMOD_PSKIPLIST)
endif()
if(ENGINE_PSKIPLIST)
if(NOT GIT_SUBMOD_PSKIPLIST EQUAL "0")
message(FATAL_ERROR "git submodule update for ENGINE_PSKIPLIST failed with ${GIT_SUBMOD_RESULT}, please checkout submodules")
endif()
list(APPEND SOURCE_FILES
src/engines-experimental/pskiplist.h
src/engines-experimental/pskiplist.cc
src/engines-experimental/pskiplist/persistent_skiplist.h
src/engines-experimental/pskiplist/smartpptr.h
src/engines-experimental/pskiplist/log4p.h
)
endif()
if(ENGINE_ROBINHOOD)
list(APPEND SOURCE_FILES
src/engines-experimental/robinhood.h
Expand Down Expand Up @@ -205,6 +228,12 @@ if(ENGINE_RADIX)
else()
message(STATUS "RADIX engine is OFF")
endif()
if(ENGINE_PSKIPLIST)
add_definitions(-DENGINE_PSKIPLIST)
message(STATUS "PSKIPLIST engine is ON")
else()
message(STATUS "PSKIPLIST engine is OFF")
endif()
if(ENGINE_ROBINHOOD)
add_definitions(-DENGINE_ROBINHOOD)
message(STATUS "ROBINHOOD engine is ON")
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ all language bindings and utilities. Engines are loaded by name at runtime.
| [tree3](doc/ENGINES-experimental.md#tree3) | Persistent B+ tree | Yes | No | No |
| [stree](doc/ENGINES-experimental.md#stree) | Sorted persistent B+ tree | Yes | No | Yes |
| [robinhood](doc/ENGINES-experimental.md#robinhood) | Persistent hash map with Robin Hood hashing | Yes | Yes | No |
| [pskiplist](doc/ENGINES-experimental.md#pskiplist) | Sorted persistent skiplist (contributed by [4Paradigm](https://github.com/4paradigm/pskiplist))| Yes | Yes | Yes |
| [dram_vcmap](doc/ENGINES-testing.md#dram_vcmap) | Volatile concurrent hash map placed entirely on DRAM | Yes | Yes | No |

The production quality engines are described in the [libpmemkv(7)](doc/libpmemkv.7.md#engines) manual
Expand Down
23 changes: 23 additions & 0 deletions doc/ENGINES-experimental.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- [radix](#radix)
- [stree](#stree)
- [robinhood](#robinhood)
- [pskiplist](#pskiplist)

# tree3

Expand Down Expand Up @@ -178,6 +179,28 @@ There are two parameters to be optionally modified by env variables:

No additional packages are required.

# pskiplist

A persistent and concurrent engine, backed by a skiplist implemented using Persistent Compare and Swap (PCAS), contributed by [4Paradigm Inc.](http://www.4paradigm.com/). The skiplist data structure is firstly introduced in a [VLDB paper](http://vldb.org/pvldb/vol14/p799-chen.pdf) **("Optimizing In-memory Database Engine for AI-powered On-line Decision Augmentation Using Persistent Memory". Cheng Chen, Jun Yang, Mian Lu, Taize Wang, Zhao Zheng, Yuqiang Chen, Wenyuan Dai, Bingsheng He, Weng-Fai Wong, Guoan Wu, Yuping Zhao, Andy Rudoff)**. It can be enabled in CMakeLists.txt using the `ENGINE_PSKIPLIST` option.

### Configuration

* **path** -- Path to the database file (layout "pmemkv_stree")
+ type: string
* **force_create** -- If 0, pmemkv opens file specified by 'path', otherwise it creates it
+ type: uint64_t
+ default value: 0
* **size** -- Only needed when force_create is not 0, specifies size of the database [in bytes]
+ type: uint64_t

### Internals

(TBD)

### Prerequisites

No additional packages are required.

# Related Work
---------

Expand Down
1 change: 1 addition & 0 deletions src/engines-experimental/pskiplist
Submodule pskiplist added at 52471f
Loading