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

feat: pika-migrate tools support pika-v4.0.0 #2988

Open
wants to merge 5 commits into
base: unstable
Choose a base branch
from
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
1 change: 1 addition & 0 deletions tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ add_subdirectory(./benchmark_client)
add_subdirectory(./binlog_sender)
add_subdirectory(./manifest_generator)
add_subdirectory(./rdb_to_pika)
add_subdirectory(./pika_migrate)
#add_subdirectory(./pika_to_txt)
#add_subdirectory(./txt_to_pika)
#add_subdirectory(./pika-port/pika_port_3)
1 change: 0 additions & 1 deletion tools/pika_migrate/.gitattributes

This file was deleted.

49 changes: 0 additions & 49 deletions tools/pika_migrate/.gitignore

This file was deleted.

26 changes: 0 additions & 26 deletions tools/pika_migrate/.travis.yml

This file was deleted.

69 changes: 69 additions & 0 deletions tools/pika_migrate/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
project(pika-migrate)

aux_source_directory(src DIR_SRCS)

set(PIKA_BUILD_VERSION_CC ${CMAKE_BINARY_DIR}/pika_build_version.cc
src/pika_cache_load_thread.cc
)
message("PIKA_BUILD_VERSION_CC : " ${PIKA_BUILD_VERSION_CC})
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/build_version.cc.in ${PIKA_BUILD_VERSION_CC} @ONLY)
Comment on lines +5 to +9
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix incorrect source file placement in version configuration.

The src/pika_cache_load_thread.cc is incorrectly placed in the PIKA_BUILD_VERSION_CC variable definition.

-set(PIKA_BUILD_VERSION_CC ${CMAKE_BINARY_DIR}/pika_build_version.cc
-        src/pika_cache_load_thread.cc
-        )
+set(PIKA_BUILD_VERSION_CC ${CMAKE_BINARY_DIR}/pika_build_version.cc)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
set(PIKA_BUILD_VERSION_CC ${CMAKE_BINARY_DIR}/pika_build_version.cc
src/pika_cache_load_thread.cc
)
message("PIKA_BUILD_VERSION_CC : " ${PIKA_BUILD_VERSION_CC})
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/build_version.cc.in ${PIKA_BUILD_VERSION_CC} @ONLY)
set(PIKA_BUILD_VERSION_CC ${CMAKE_BINARY_DIR}/pika_build_version.cc)
message("PIKA_BUILD_VERSION_CC : " ${PIKA_BUILD_VERSION_CC})
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/build_version.cc.in ${PIKA_BUILD_VERSION_CC} @ONLY)


set(PROTO_FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/pika_inner_message.proto ${CMAKE_CURRENT_SOURCE_DIR}/src/rsync_service.proto)
custom_protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS ${PROTO_FILES})
message("pika PROTO_SRCS = ${PROTO_SRCS}")
message("pika PROTO_HDRS = ${PROTO_HDRS}")

add_executable(${PROJECT_NAME}
${DIR_SRCS}
${PROTO_SRCS}
${PROTO_HDRS}
${PIKA_BUILD_VERSION_CC})

target_link_directories(${PROJECT_NAME}
PUBLIC ${INSTALL_LIBDIR_64}
PUBLIC ${INSTALL_LIBDIR})

add_dependencies(${PROJECT_NAME}
gflags
gtest
${LIBUNWIND_NAME}
glog
fmt
snappy
zstd
lz4
zlib
${LIBGPERF_NAME}
${LIBJEMALLOC_NAME}
rocksdb
protobuf
pstd
net
rediscache
storage
cache
)

target_include_directories(${PROJECT_NAME}
PUBLIC ${CMAKE_CURRENT_BINARY_DIR}
PUBLIC ${PROJECT_SOURCE_DIR}
${INSTALL_INCLUDEDIR}
)

target_link_libraries(${PROJECT_NAME}
cache
storage
net
pstd
${GLOG_LIBRARY}
librocksdb.a
${LIB_PROTOBUF}
${LIB_GFLAGS}
${LIB_FMT}
libsnappy.a
libzstd.a
liblz4.a
libz.a
librediscache.a
${LIBUNWIND_LIBRARY}
${JEMALLOC_LIBRARY})
46 changes: 0 additions & 46 deletions tools/pika_migrate/CODE_OF_CONDUCT.md

This file was deleted.

1 change: 0 additions & 1 deletion tools/pika_migrate/CONTRIBUTING.md

This file was deleted.

21 changes: 0 additions & 21 deletions tools/pika_migrate/Dockerfile

This file was deleted.

10 changes: 0 additions & 10 deletions tools/pika_migrate/LICENSE

This file was deleted.

Loading