Skip to content

Commit

Permalink
add oneshot command for recovery test
Browse files Browse the repository at this point in the history
  • Loading branch information
ban-nobuhiro committed Jun 22, 2023
1 parent 7734e59 commit f28c94b
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ endif()
# if (BUILD_DOCUMENTS)
# add_subdirectory(doxygen)
# endif()
add_subdirectory(util)

install(
TARGETS
Expand Down
14 changes: 14 additions & 0 deletions util/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

add_executable(run-recovery run-recovery.cpp)

target_include_directories(run-recovery
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../src/limestone
)

target_link_libraries(run-recovery
PRIVATE limestone-impl
PRIVATE Boost::filesystem
PRIVATE glog::glog
PRIVATE gflags::gflags
)
17 changes: 17 additions & 0 deletions util/run-recovery.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

#include <limestone/api/configuration.h>
#include <limestone/api/datastore.h>
#include <limestone/logging.h>

#include <glog/logging.h>

DEFINE_int32(recover_max_pararelism, 1, "# of insert thread");

int main(int argc, char *argv[]) {
gflags::ParseCommandLineFlags(&argc, &argv, true);

limestone::api::configuration conf({argv[1]}, "");
conf.set_recover_max_pararelism(FLAGS_recover_max_pararelism);
limestone::api::datastore d(conf);
d.ready();
}

0 comments on commit f28c94b

Please sign in to comment.