zavier-wong / acid Goto Github PK
View Code? Open in Web Editor NEWA distributed service governance framework. 分布式服务治理框架
License: GNU Affero General Public License v3.0
A distributed service governance framework. 分布式服务治理框架
License: GNU Affero General Public License v3.0
我是ubuntu系统,更新了g++-11。
在cmake中设置 '-std=c++20' ,make时会报错
c++: error: unrecognized command line option ‘-std=c++20’; did you mean ‘-std=c++2a’?
如果改为 '-std=c++2a' 又会报
fatal error: concepts: No such file or directory
希望更详细地说明一下项目中c++20如何通过编译,谢谢!
直接把负载均衡模块做个客户端,是不是不太妥当?按道理,负载均衡对于客户端来说,应该是无感知的,是不是可以把负载均衡单独出来一个服务?
对于makefile这块不是很熟悉,感觉看着好乱,望大佬提供点思路^^
这里m_loggers类型是mapstd::string,Logger::ptr,但我看具体实现好像对key的排序没啥要求,如果只是单纯哈希的话,是不是unordered_map会更好一点,毕竟map底层是红黑树,一次查询的复杂度是O(logN)级别的,而unordered_map是O(1)
系统: Ubuntu20.04 LTS
按照安装文档,升了gcc g++ 也安装了yaml-cpp,这是什么原因?求解决
[ 39%] Linking CXX executable ../../bin/test/test_log
cd /home/w/Workspace/CpperDay/C++/项目/acid/build/tests && /usr/bin/cmake -E cmake_link_script CMakeFiles/test_log.dir/link.txt --verbose=1
/usr/bin/g++-11 -rdynamic -std=c++20 -Wall -Werror -Wno-deprecated -Wno-unused-function CMakeFiles/test_log.dir/test_log.cpp.o -o ../../bin/test/test_log -L/home/w/Workspace/CpperDay/C++/项目/acid/lib -Wl,-rpath,/home/w/Workspace/CpperDay/C++/项目/acid/lib ../../lib/libacid.so -lpthread -lyaml-cpp -ldl
/usr/bin/ld: ../../lib/libacid.so: undefined reference to `YAML::detail::node::m_amount'
/usr/bin/ld: ../../lib/libacid.so: undefined reference to `YAML::detail::node_data::empty_scalar[abi:cxx11]()'
/usr/bin/ld: ../../lib/libacid.so: undefined reference to `YAML::detail::node_data::push_back(YAML::detail::node&, std::shared_ptr<YAML::detail::memory_holder> const&)'
/usr/bin/ld: ../../lib/libacid.so: undefined reference to `YAML::detail::node_data::convert_to_map(std::shared_ptr<YAML::detail::memory_holder> const&)'
collect2: error: ld returned 1 exit status
make[2]: *** [tests/CMakeFiles/test_log.dir/build.make:88: ../bin/test/test_log] Error 1
make[2]: Leaving directory '/home/w/Workspace/CpperDay/C++/项目/acid/build'
make[1]: *** [CMakeFiles/Makefile2:228: tests/CMakeFiles/test_log.dir/all] Error 2
make[1]: Leaving directory '/home/w/Workspace/CpperDay/C++/项目/acid/build'
make: *** [Makefile:87: all] Error 2
嗨! 你好,看了这个repo感觉受益匪浅!
有问题想请教一下, 按照我的理解,这个repo里的协程似乎并没有使用C++ 20 里的标准, 而是通过定义Fiber类自己实现了一套协程?
想在服务端实现负载均衡是怎么样的一个思路,老哥能给个想法吗。
Ubuntu 21.10
Clion-2021.1.3
2022-04-08 23:46:57 [ DEBUG ] [root] 20761 main 0 tests/test_scheduler.cpp:70 main
2022-04-08 23:46:57 [ INFO ] [system] 20761 main 0 source/scheduler.cpp:144 notify
2022-04-08 23:46:57 [ DEBUG ] [root] 20764 test_2 2 tests/test_scheduler.cpp:64 Im fiber 1
2022-04-08 23:46:57 [ ERROR ] [root] 20761 main 0 source/scheduler.cpp:21 ASSERTION: m_stop
backtrace:
/home/titto/CProjects/acid-main/bin/test/test_scheduler(_ZN4acid9SchedulerD1Ev+0x236) [0x55b92b1cd5f4]
/home/titto/CProjects/acid-main/bin/test/test_scheduler(main+0x206) [0x55b92b1678ec]
/lib/x86_64-linux-gnu/libc.so.6(+0x29fd0) [0x7f11eaa4cfd0]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x7d) [0x7f11eaa4d07d]
/home/titto/CProjects/acid-main/bin/test/test_scheduler(_start+0x25) [0x55b92b1662c5]
2022-04-08 23:46:57 [ INFO ] [system] 20763 test_1 3 source/scheduler.cpp:149 idle
test_scheduler: source/scheduler.cpp:21: virtual acid::Scheduler::~Scheduler(): Assertion `m_stop' failed.
Process finished with exit code 134 (interrupted by signal 6: SIGABRT)
你好,首先我觉得写的挺好的,我有个问题,这个http支持http2.0嘛 ,因为rpc是一对一的,我之前用过rpc是支持http2.0 的,然后它社区也有对应协成的一些仓库,如果这边可以改善是个很好的点 我也试着学习修改
报错信息:
macro "__has_attribute" requires an identifier 304 | #if __GNUC_PREREQ (2,5) || __glibc_has_attribute (__const__)
您好!每次打开第三个集群都会出现倒数两行关于entry冲突的日志;另外任期一直在不断增长,在稳定的raft流程中似乎不会出现这种情况?期待您对这两个问题出现的原因及如何解决的答复,感谢您!
xxx@ubuntu:~/acid/example/build/kvhttp$ ./kvhttp_server 3
[2023-04-21 13:11:26.564] [acid] [info] [util.cpp:13] ENABLE_DEBUGGER
[2023-04-21 13:11:26.564] [info] [kvhttp_server.cpp:58] argv[1] = 3
[2023-04-21 13:11:26.564] [acid] [info] [persister.cpp:20] Persist path : /home/xxx/acid/example/build/kvhttp/kvhttp-3
[2023-04-21 13:11:26.565] [acid] [debug] [raft_node.cpp:492] Node[3] add peer[1], address is 127.0.0.1:7001
[2023-04-21 13:11:26.565] [acid] [debug] [raft_node.cpp:492] Node[3] add peer[2], address is 127.0.0.1:7002
[2023-04-21 13:11:26.565] [acid] [info] [tcp_server.cpp:51] server Raft-Node[3] bind [socket sock=3 isConnected=0 family=2 type=1 protocol=0 localAddress=127.0.0.1:7003] success
[2023-04-21 13:11:26.565] [acid] [info] [tcp_server.cpp:51] server acid/1.0.0 bind [socket sock=4 isConnected=0 family=2 type=1 protocol=0 localAddress=127.0.0.1:10003] success
[2023-04-21 13:11:26.565] [acid] [info] [raft_node.cpp:98] initialize from state persisted before a crash, term 162, vote -1, commit 2
[2023-04-21 13:11:26.566] [acid] [debug] [kvserver.cpp:132] Node[3] tries to apply message type: Entry, index: 1, term: 94, data size: 0
[2023-04-21 13:11:26.566] [acid] [debug] [kvserver.cpp:132] Node[3] tries to apply message type: Entry, index: 2, term: 95, data size: 0
[2023-04-21 13:11:26.566] [acid] [debug] [raft_node.cpp:175] Node[3] applies entries 0-2 in term 162
[2023-04-21 13:11:26.775] [acid] [debug] [rpc_server.cpp:118] handleClient: [socket sock=6 isConnected=1 family=2 type=1 protocol=0 localAddress=127.0.0.1:7003 remoteAddress=127.0.0.1:55704]
[2023-04-21 13:11:26.775] [acid] [critical] [raft_log.cpp:91] found conflict at index 2 [existing term: 95, conflicting term: 99]
[2023-04-21 13:11:26.775] [acid] [critical] [raft_log.cpp:39] entry 2 conflict with committed entry [committed(2)]
我在test_fiber里运行test1例子,出现了stack smashing detected ****
2022-11-17 11:52:56 [ INFO ] [root] 6918 main 0 source/http/parse.cpp:400 lookup name=raft.timer.election.top already exist 2022-11-17 11:52:56 [ INFO ] [root] 6919 main_0 2 tests/test_fiber.cpp:21 begin 2022-11-17 11:52:56 [ INFO ] [root] 6919 main_0 5 tests/test_fiber.cpp:13 run_in_fiber begin 2022-11-17 11:52:56 [ INFO ] [root] 6919 main_0 0 tests/test_fiber.cpp:24 after swap in 2022-11-17 11:52:56 [ INFO ] [root] 6919 main_0 5 tests/test_fiber.cpp:15 run_in_fiber end 2022-11-17 11:52:56 [ INFO ] [root] 6919 main_0 0 tests/test_fiber.cpp:26 end *** stack smashing detected ***: terminated [1] 6918 abort ./test_fiber
请问是什么原因呢?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.