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

Feature 20230610 vector #171

Merged
merged 5 commits into from
Jun 17, 2023
Merged
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
65 changes: 53 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,48 @@ find_package(benchmark REQUIRED)
# google benchmark end
################################################

# build eraftvdb

set(eraftvdb_sources)
list(APPEND eraftvdb_sources src/async_buffer.cc)
list(APPEND eraftvdb_sources src/async_buffer.h)
list(APPEND eraftvdb_sources src/buffer.h)
list(APPEND eraftvdb_sources src/client.cc)
list(APPEND eraftvdb_sources src/client.h)
list(APPEND eraftvdb_sources src/epoller.cc)
list(APPEND eraftvdb_sources src/epoller.h)
list(APPEND eraftvdb_sources src/eraft_vdb_server.cc)
list(APPEND eraftvdb_sources src/eraft_vdb_server.h)
list(APPEND eraftvdb_sources src/listen_socket.cc)
list(APPEND eraftvdb_sources src/listen_socket.h)
list(APPEND eraftvdb_sources src/net_thread_pool.cc)
list(APPEND eraftvdb_sources src/net_thread_pool.h)
list(APPEND eraftvdb_sources src/proto_parser.cc)
list(APPEND eraftvdb_sources src/proto_parser.h)
list(APPEND eraftvdb_sources src/server.cc)
list(APPEND eraftvdb_sources src/server.h)
list(APPEND eraftvdb_sources src/socket.cc)
list(APPEND eraftvdb_sources src/socket.h)
list(APPEND eraftvdb_sources src/stream_socket.cc)
list(APPEND eraftvdb_sources src/stream_socket.h)
list(APPEND eraftvdb_sources src/task_manager.cc)
list(APPEND eraftvdb_sources src/task_manager.h)
list(APPEND eraftvdb_sources src/thread_pool.cc)
list(APPEND eraftvdb_sources src/thread_pool.h)
list(APPEND eraftvdb_sources src/unbounded_buffer.cc)
list(APPEND eraftvdb_sources src/unbounded_buffer.h)
list(APPEND eraftvdb_sources src/eraftkv.grpc.pb.cc)
list(APPEND eraftvdb_sources src/eraftkv.pb.cc)

add_executable(eraft-vdb ${eraftvdb_sources})
target_link_libraries(eraft-vdb
pthread
rocksdb
gRPC::grpc++
${Protobuf_LIBRARY}
stdc++fs
)
target_include_directories(eraft-vdb PUBLIC ${eraftkv_INCLUDE_DIR})

# build eraftkv
set(eraftkv_sources)
Expand All @@ -144,8 +186,7 @@ list(APPEND eraftkv_sources src/util.cc)
list(APPEND eraftkv_sources src/raft_server.cc)
list(APPEND eraftkv_sources src/log_entry_cache.cc)
list(APPEND eraftkv_sources src/grpc_network_impl.cc)
list(APPEND eraftkv_sources src/main.cc)

list(APPEND eraftkv_sources src/eraftkv.cc)

set(eraftkv_INCLUDE_DIR ${eraftkv_sources_SOURCE_DIR})

Expand Down Expand Up @@ -180,16 +221,16 @@ target_link_libraries(eraftkv_server_test PUBLIC
)

add_executable(rocksdb_storage_impl_tests
src/rocksdb_storage_impl_tests.cc
src/util.cc
src/rocksdb_storage_impl.cc
src/eraftkv_server.cc
src/eraftkv.pb.cc
src/eraftkv.grpc.pb.cc
src/raft_server.cc
src/log_storage_impl.cc
src/rocksdb_storage_impl.cc
src/log_entry_cache.cc
src/rocksdb_storage_impl_tests.cc
src/util.cc
src/rocksdb_storage_impl.cc
src/eraftkv_server.cc
src/eraftkv.pb.cc
src/eraftkv.grpc.pb.cc
src/raft_server.cc
src/log_storage_impl.cc
src/rocksdb_storage_impl.cc
src/log_entry_cache.cc
)
target_link_libraries(rocksdb_storage_impl_tests PUBLIC
${GTEST_LIBRARIES}
Expand Down
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ FROM eraft/eraftkv:v0.0.4
# intstall google benchmark
# RUN git clone https://github.com/google/benchmark.git && git clone https://github.com/google/googletest.git benchmark/googletest && cd benchmark && cmake -E make_directory "build" && cmake -E chdir "build" cmake -DCMAKE_BUILD_TYPE=Release ../ && cmake --build "build" --config Release --target install

RUN cd /grpc/third_party/protobuf && ./autogen.sh && ./configure && make -j8 && make install
# RUN cd /grpc/third_party/protobuf && ./autogen.sh && ./configure && make -j8 && make install

RUN ldconfig
# RUN ldconfig

RUN apt-get install -y redis-tools telnet
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# SOFTWARE.
default: image

IMAGE_VERSION := v0.0.5
IMAGE_VERSION := v0.0.6

BUILDER_IMAGE := $(or $(BUILDER_IMAGE),eraft/eraftkv:$(IMAGE_VERSION))

Expand All @@ -37,9 +37,9 @@ gen-protocol-code:
# build eraftkv on local machine
build-dev:
chmod +x utils/build-dev.sh
docker run -it --rm -v $(realpath .):/eraft eraft/eraftkv:v0.0.4 /eraft/utils/build-dev.sh
docker run -it --rm -v $(realpath .):/eraft eraft/eraftkv:v0.0.6 /eraft/utils/build-dev.sh

# run all unit test
tests:
chmod +x utils/run-tests.sh
docker run -it --rm -v $(realpath .):/eraft eraft/eraftkv:v0.0.4 /eraft/utils/run-tests.sh
docker run -it --rm -v $(realpath .):/eraft eraft/eraftkv:v0.0.6 /eraft/utils/run-tests.sh
7 changes: 0 additions & 7 deletions doc/0.大纲.md

This file was deleted.

41 changes: 0 additions & 41 deletions doc/1.白皮书目录.md

This file was deleted.

92 changes: 0 additions & 92 deletions doc/2.总体设计.md

This file was deleted.

Loading