KVstorageBaseRaft-cpp icon indicating copy to clipboard operation
KVstorageBaseRaft-cpp copied to clipboard

【代码随想录知识星球】项目分享-基于Raft的k-v存储数据库

Results 24 KVstorageBaseRaft-cpp issues
Sort by recently updated
recently updated
newest added

[https://blog.csdn.net/qq_42265552/article/details/130438562](url)里的第三条可以解决这个问题。

provider和consumer执行后如图所示, ![68aa14a3b3b3c985ea974805a6e71a9](https://github.com/youngyangyang04/KVstorageBaseRaft-cpp/assets/169135997/49f135eb-4003-469d-9f5f-e6ea4a971395) 而raftCoreRun运行后提示的是 format: command -n -f ![2](https://github.com/youngyangyang04/KVstorageBaseRaft-cpp/assets/169135997/2b225d99-9e5d-4667-af6e-c1cd78a78abd)

你好,我是在centos下构建项目的,我在make时 遇到了如下问题 尝试了很久发现还是不会解决 所以来请教一下大家! ![image](https://github.com/youngyangyang04/KVstorageBaseRaft-cpp/assets/145561589/e17a7585-363d-42b6-955c-5039ac30219e)

![Snipaste_2024-05-08_21-41-47](https://github.com/youngyangyang04/KVstorageBaseRaft-cpp/assets/50019934/a3384370-82c8-4540-b1db-809c978ed9dc) ![Snipaste_2024-05-08_21-46-48](https://github.com/youngyangyang04/KVstorageBaseRaft-cpp/assets/50019934/c4f9282b-91bf-43b4-99c6-7116b0d90fa6)

[ 1%] Building CXX object CMakeFiles/skip_list_on_raft.dir/src/rpc/mprpcchannel.cpp.o In file included from /home/gu/K-V存储数据库-demo/KVstorageBaseRaft-cpp-main/src/rpc/mprpcchannel.cpp:9: /home/gu/K-V存储数据库-demo/KVstorageBaseRaft-cpp-main/src/rpc/include/rpcheader.pb.h:10:10: fatal error: google/protobuf/port_def.inc: 没有那个文件或目录 10 | #include | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. make[2]: *** [CMakeFiles/skip_list_on_raft.dir/build.make:76:CMakeFiles/skip_list_on_raft.dir/src/rpc/mprpcchannel.cpp.o] 错误 1 make[1]: ***...

![Snipaste_2024-04-10_14-48-52](https://github.com/youngyangyang04/KVstorageBaseRaft-cpp/assets/107487384/8221cc3e-dc47-43ed-860a-0077b287190c) 这里为什么要向kvserver推送两次安装的日志信息

good first issue

项目目前主体已经完成。 还需要一些优化,包括但不限于:性能优化,更优雅的函数实现。具体的优化会以issue的方式提出。 也欢迎大家在`issue`提出问题和`pr`提出自己的改进方案。 **目前项目各个部分考虑都不是很精细,是最好参与的时间节点,走过路过不容错过吼吼** 目前已有的任务如下,欢迎大家来认领并完成,如果想完成但是有困难,我也会提供帮助,在对应issue链接下面评论即可。 也可以**在这里提出可以改进的想法**。 **现有任务列表:** - [ ] https://github.com/youngyangyang04/KVstorageBaseRaft-cpp/issues/14 - [x] https://github.com/youngyangyang04/KVstorageBaseRaft-cpp/issues/13 - [x] https://github.com/youngyangyang04/KVstorageBaseRaft-cpp/issues/19 - [x] https://github.com/youngyangyang04/KVstorageBaseRaft-cpp/issues/16 - [x] https://github.com/youngyangyang04/KVstorageBaseRaft-cpp/issues/31 - [ ] https://github.com/youngyangyang04/KVstorageBaseRaft-cpp/issues/35 - [ ]...

![raft调试](https://github.com/youngyangyang04/KVstorageBaseRaft-cpp/assets/107387898/8be51187-60b3-4e4a-9041-88efc5d70ba3) 这里没有使用跳表,而是将文件数据读取为字符串后进行传输。图片中是服务端的日志,一旦读取完数据进行传输就会提示is not leader,还有很长一段跟上图同样的日志信息,最终客户端等待长时间后会提示栈溢出。但是Put()该文件却能成功执行,不太清楚原因。

bug

在执行完./provider后,在另一个终端执行。/consumer出现RPC请求失败 ![image](https://github.com/youngyangyang04/KVstorageBaseRaft-cpp/assets/73152972/287c0b68-9271-4b62-ba8d-006a728580f0) ![image](https://github.com/youngyangyang04/KVstorageBaseRaft-cpp/assets/73152972/093b22ac-03db-4d2a-acc7-93d19bbef4bc) ./provider后的ip是127.0.0.1但是./consumer的ip是127.0.1.1,是不能重开终端运行吗

question

可以参考thread_pool项目 这个issue内容待完善,看到了可以提醒我完善下。