memgraph/tools/src/CMakeLists.txt

33 lines
1.4 KiB
CMake
Raw Normal View History

add_executable(mg_import_csv
mg_import_csv/main.cpp
# This is just friggin terrible. mg_import_csv needs to depend almost on
# the whole memgraph, just to use TypedValue and BaseEncoder.
${memgraph_src_dir}/communication/bolt/v1/decoder/decoded_value.cpp
${memgraph_src_dir}/data_structures/concurrent/skiplist_gc.cpp
${memgraph_src_dir}/database/graph_db_accessor.cpp
${memgraph_src_dir}/durability/paths.cpp
${memgraph_src_dir}/durability/snapshooter.cpp
Write-ahead log Summary: My dear fellow Memgraphians. It's friday afternoon, and I am as ready to pop as WAL is to get reviewed... What's done: - Vertices and Edges have global IDs, stored in `VersionList`. Main storage is now a concurrent map ID->vlist_ptr. - WriteAheadLog class added. It's based around buffering WAL::Op objects (elementraly DB changes) and periodically serializing and flusing them to disk. - Snapshot recovery refactored, WAL recovery added. Snapshot format changed again to include necessary info. - Durability testing completely reworked. What's not done (and should be when we decide how): - Old WAL file purging. - Config refactor (naming and organization). Will do when we discuss what we want. - Changelog and new feature documentation (both depending on the point above). - Better error handling and recovery feedback. Currently it's all returning bools, which is not fine-grained enough (neither for errors nor partial successes, also EOF is reported as a failure at the moment). - Moving the implementation of WAL stuff to .cpp where possible. - Not sure if there are transactions being created outside of `GraphDbAccessor` and it's `BuildIndex`. Need to look into. - True write-ahead logic (flag controlled): not committing a DB transaction if the WAL has not flushed it's data. We can discuss the gain/effort ratio for this feature. Reviewers: buda, mislav.bradac, teon.banek, dgleich Reviewed By: dgleich Subscribers: mtomic, pullbot Differential Revision: https://phabricator.memgraph.io/D958
2017-11-13 16:50:49 +08:00
${memgraph_src_dir}/durability/wal.cpp
${memgraph_src_dir}/query/typed_value.cpp
${memgraph_src_dir}/storage/edge_accessor.cpp
${memgraph_src_dir}/storage/locking/record_lock.cpp
${memgraph_src_dir}/storage/property_value.cpp
${memgraph_src_dir}/storage/record_accessor.cpp
${memgraph_src_dir}/storage/vertex_accessor.cpp
${memgraph_src_dir}/transactions/engine_master.cpp
${memgraph_src_dir}/transactions/engine_worker.cpp
)
# Strip the executable in release build.
string(TOLOWER ${CMAKE_BUILD_TYPE} lower_build_type)
if (lower_build_type STREQUAL "release")
add_custom_command(TARGET mg_import_csv POST_BUILD
COMMAND strip -s mg_import_csv
COMMENT Stripping symbols and sections from mg_import_csv)
endif()
target_link_libraries(mg_import_csv stdc++fs Threads::Threads fmt
gflags glog cppitertools)
install(TARGETS mg_import_csv
RUNTIME DESTINATION .)