Giter VIP home page Giter VIP logo

dcache's Introduction

背景

DCache是一个基于TARS框架开发的分布式NoSQL存储系统,数据采用内存存储,支持连接后端DB实现数据持久化。DCache采用集群模式,具有高扩展、高可用的特点。

DCache在腾讯内部有大量业务使用,日访问总量超万亿次。

DCache具有以下特点

  • 高性能存储引擎,支持key-value,k-k-row,list,set,zset多种数据结构,支持数据持久化落地后端DB。
  • 集群模式,高扩展,高可用,支持异地镜像,就近接入。
  • 通过名字访问,支持同步、异步、单向RPC调用。
  • 高效运维平台,在线完成服务部署、扩缩容、迁移,以及服务配置,服务调用质量监控。
  • 业务无须和直接和mysql交互, DCache会自动缓写DB

支持平台

  • Linux

开发语言

  • C++

快速上手

DCache的安装建议通过TarsWeb的服务市场安装.

文档

DCache接口使用方法请参考文档Proxy接口指南,更多文档请查看docs目录

目录说明

  • src:存储相关的后台服务代码。
目录 功能
src/Comm 各服务共用的通用代码
src/ConfigServer DCache配置服务
src/DbAccess 数据持久化DB的代理服务
src/KVCacheServer key-value存储服务
src/MKVCacheServer k-k-row、list、set、zset存储服务
src/OptServer 服务部署、运维管理,供web管理平台调用
src/PropertyServer 监控信息上报服务
src/Proxy DCache代理服务
src/Router DCache路由管理服务
src/TarsComm Tars数据结构定义
  • docs:文档。

数据库说明

DCache框架依赖mysql数据库, 当DCache安装以后, 它自动会创建以下数据库

  • db_cache_web: DCache的web依赖
  • db_dcache_relation: DCacheOptServer/ConfigServer/PropertyServer/DCacheWebServer依赖, 注意DCacheWebServer只是会创建它, 并不是直接使用它
  • db_dcache_property: DCache统计数据库, PropertyServer依赖

需要在安装过程中正确设置配置文件中的数据库的地址.

实际每套创建的每套Cache, 如果设置了数据落地, 那么也依赖mysql, 这个在DCache管理平台上可以设置, 安装时正确配置即可.

参与贡献

如果你有任何想法,别犹豫,立即提 Issues 或 Pull Requests,欢迎所有人参与到DCache的开源建设中。
详见:CONTRIBUTING.md

dcache's People

Contributors

ruanshudong avatar shanbaoyin avatar etzhangsx avatar dongguawdy avatar shevqko avatar smilefisher avatar pireirik avatar htner avatar tars-baby avatar shao198822 avatar

Stargazers

 avatar tutu avatar Dimitrios Kapetanios avatar Excas avatar Dirk Arnez avatar Mingqiang Sun avatar HuanXin-Chen avatar chenxiaofeng avatar Smarter avatar  avatar RyuyaYakumo avatar MagicKitty avatar ULis avatar  avatar 小子欠扁 avatar lensYCH avatar terrydang avatar  avatar Zheng Hua avatar  avatar listenwind avatar  avatar Ping'an Tian avatar guoxue avatar  avatar 专注而高效 avatar Feng avatar Baitao avatar  avatar pedoc avatar  avatar lsjtinya avatar Kylin Woo avatar cool chaochao  avatar Corit avatar  avatar Clifton Hills avatar Readm avatar Shawn Wang avatar Yunxiao Du avatar  avatar  avatar fengyueqiao avatar  avatar  avatar BenjamSanchez avatar LuausDalmolin avatar anshiwang2 avatar songtaizui avatar suiliangchu avatar censujiangsha avatar huizongsong avatar Li Yinan avatar  avatar  avatar raynor avatar Bin Liang avatar caiqiang avatar  avatar popy32 avatar  avatar  avatar Zhao Lei avatar  avatar dengos avatar  avatar  avatar hy avatar  avatar zhangqiang avatar hehanjing avatar Yanhao avatar toge avatar yang tianrui avatar Basel Ajarmah avatar StudyU avatar  avatar Marc SUN avatar Kyon avatar  avatar george avatar  avatar trivia avatar Jianqiu Zhang avatar LorinLee avatar fanslater avatar forTWOS avatar cheng avatar  avatar Rhynu Hez avatar diedai avatar fideism avatar Larry avatar Cyrus Zhou avatar acoder2014 avatar Shijun Qin avatar kimifdw avatar kyle-hy avatar RedApricot avatar Hades avatar

Watchers

黑夜路人 avatar davidwei_001 avatar DAO LONG avatar KOO avatar  avatar  avatar ruofeng avatar  avatar  avatar Edward Xie avatar  avatar Basel Ajarmah avatar  avatar timeHuang_HUST avatar wsdflink avatar Richard Redle avatar zhang avatar Fan Wu avatar  avatar ccf19881030.github.io avatar yongjian avatar hzh avatar cici7758.com avatar  avatar Zyu avatar  avatar Jack Li avatar ifshyse avatar  avatar  avatar ZhuSong avatar  avatar skyformat99 avatar  avatar  avatar  avatar  avatar  avatar winstonxie avatar new people avatar  avatar Long avatar TomYang1898 avatar 腾讯开源 avatar  avatar  avatar smitchzhao avatar  avatar  avatar Yuan avatar  avatar  avatar

dcache's Issues

RouterServer主备状态错误

RouterServer::initialize中,因屏蔽setUpEtcd,导致RouterServer状态总是SLAVE,且未发现有其它地方设置为MASTER。
实际运行报错:

2020-04-28 14:44:52|140129599477504|INFO|RouterImp.cpp:heartBeatReport:256|This is slave, request will proxy to master
2020-04-28 14:44:52|140129599477504|INFO|RouterImp.cpp:updateMasterPrx:916|master router obj =
2020-04-28 14:44:52|140129599477504|ERROR|RouterImp.cpp:updateMasterPrx:920|master router obj not set

install访问tars时出现Method Not Allowed

企业微信截图_16347969738913
ConfigServer, OptServer和PropertyServer都报了这个错

但是后面上传ProxyServer等又能成功
企业微信截图_16347971201328

打算手动部署opt等server,然而提示应用名非法
企业微信截图_16347972334648

操作严格按照DCache和Tars的手动安装步骤来的,环境:wsl2下的ubuntu20.04

压测 KVCacheServer 报错

  1. 问题出现过程:
    go 程序调用 WCache_IF.go 进行写压测(通过 tars2go 工具编译 WCache.tars 获得), 未出现系统资源吃紧,在并发请求8k路总请求数10w的情况下,服务出现以下报错:
    2019-06-25 15:26:46|15803|ERROR|[TARS]ServantHandle::handle queue timeout:DCache.DCacheApp_oneKVCacheServer1-1.WCacheObj|setKV|1561015603502|600000|3000|1561015606522|10.xxx.137.193:45528

  2. 一些尝试:
    1)总请求数不变,并发调整到7k时,未出现服务异常报错。
    2)调整 WCacheObj、Route、Proxy 的最大连接数、队列长度和超时时间等,没有明显改善。

  3. 系统配置
    8核 32G CentOS Linux release 7.2.1511 (Core)

希望能提供些解决思路,是否由某些配置参数制约影响造成的。

make失败 no type named ‘type’ in ‘struct std::enable_if<false, void***>’

源码编译安装TarsFramework最新代码成功,TasrWeb可成功访问,TarsWeb上显示的版本如下:
web:2.4.20
framework:3.0.2
下载DCache源码编译,make时出错,错误信息如下:

/usr/local/tars/cpp/include/tup/TarsJson.h:713:28: 附注:  template argument deduction/substitution failed:  
/usr/local/tars/cpp/include/tup/TarsJson.h: In substitution of ‘template<class T> static tars::JsonValueObjPtr  tars::JsonOutput::writeJson(const T&, typename std::enable_if<std::is_convertible<T*, tars::TarsStructBase*>::value, void***>::type) [with T = std::map<DCache::StatPropMsgHead, DCache::StatPropMsgBody>]’:  
/dCacheSrc/DCache/src/PropertyServer/Property.h:1855:88:   required from here  
/usr/local/tars/cpp/include/tup/TarsJson.h:713:28: 错误:no type named ‘type’ in ‘struct std::enable_if<false, void***>’  
make[2]: *** [src/PropertyServer/CMakeFiles/PropertyServer.dir/PropertyDbManager.cpp.o] 错误 1  
make[1]: *** [src/PropertyServer/CMakeFiles/PropertyServer.dir/all] 错误 2  
make: *** [all] 错误 2  

zset 生成的数据库表缺一个字段‘sDCacheZSetScore’

2020-11-24 16:18:05|140437419443968|ERROR|[TC_Mysql::execute]: mysql_real_query: [ replace into db_JSAPPzset_0.t_JSAPPzset_0 (mkey,sDCacheExpireTime,sDCacheZSetScore,value) values ('1st',0,824,'3rd') ] :Unknown column 'sDCacheZSetScore' in 'field list'

insertKV代理服务存在bug

Proxy服务中的ProxyImp::insertKV函数中,如下行:
prxWCache->async_setKV(cb, req);
修改为:
prxWCache->async_insertKV(cb, req);

迁移过程中的执行路径问题

Router/Transfer.cpp 中,第63行:

int rc = _dbHandle->updateTransferingRecord(transInfoNew,
                                            transInfoComplete,
                                            cleanSrc,
                                            cleanDest,
                                            cleanSrcHasInc,
                                            cleanDestHasInc,
                                            0);

在调用 DbHandle::updateTransferingRecord 函数时,iReturn 参数硬编码为0,且我未能找到其他地方有调用 DbHandle::updateTransferingRecord 这个重载函数,那么 DbHandle.cpp 中,在多次执行后,必然会进入到第1855行的分支,而第1871行到1955行的分支没有路径进入,那么其存在有什么特殊的意义吗?

在DCache的ZSet持久化时,遇到的两个问题

hi 我在DCache的ZSet的cache持久化到mysql时遇到两个问题。需要我手动改下数据库的表才可以。
这样正常吗? 是不是DCache创建数据库表时就创建好呀?

  1. 数据库表需要手动添加 sDCacheZSetScore 列。否则会报错。
  2. 数据库表的 VALUE列需要设置为主键。否则持久化时只会有一条数据(replace into ...)。

84BB70D8AC14D984C3B43E31F8246FC4

t_router_switch 表缺失,程序报错

简单看了下 程序,感觉少建了这个表。请确认。

DbHandle::insertSwitchInfo|[TC_Mysql::execute]: mysql_query: [ insert into t_router_switch (app_name,module_name,group_name,master_server,slave_server,mirror_idc,master_mirror,slave_mirror,switch_type,switch_result,access_status,comment,switch_property,switch_time,modify_time) values((select app_name from t_router_app where router_name='DCache.DCache3RouterServer'),'DCache3Test1','DCache3Test1KVGroup1','DCache.DCache3Test1KVCacheServer1-1','DCache.DCache3Test1KVCacheServer1-2','','','',0,3,0,'SwitchThread:: slaveBinlogdif diffBinlogTime(1556264300) > 300 DCache.DCache3Test1KVCacheServer1-2','auto',FROM_UNIXTIME(1556264568), now()) ] :Table 'db_dcache_relation.t_router_switch' doesn't exist
-- | -- | --

CMake报错

cmake version 3.10.2
执行cmake时报错:
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is unknown
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
CMake Error at CMakeLists.txt:3 (project):
No CMAKE_CXX_COMPILER could be found.

Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.

make release error

编译dcache,执行以下命令
mkdir build; cd build; cmake ..; make; make release
最后一步make release报错

Scanning dependencies of target release
release all
CMake Error: Error processing file: /root/workspace/tars/DCache/build/run-release-ConfigServer.cmake
CMake Error: Error processing file: /root/workspace/tars/DCache/build/run-release-DbAccessServer.cmake
CMake Error: Error processing file: /root/workspace/tars/DCache/build/run-release-KVCacheServer.cmake
CMake Error: Error processing file: /root/workspace/tars/DCache/build/run-release-MKVCacheServer.cmake
CMake Error: Error processing file: /root/workspace/tars/DCache/build/run-release-OptServer.cmake
CMake Error: Error processing file: /root/workspace/tars/DCache/build/run-release-PropertyServer.cmake
CMake Error: Error processing file: /root/workspace/tars/DCache/build/run-release-ProxyServer.cmake
CMake Error: Error processing file: /root/workspace/tars/DCache/build/run-release-RouterServer.cmake
Built target release

【openEuler】如何更加优雅地将DCache做成RPM包以集成到openEuler操作系统中

DCache作为国内十分优秀的开源项目,码云上 @zhang_donglin1 和 @D_dd 正在尝试将DCache做成RPM包集成到openEuler(国内开源操作系统)中,以更加方便更多人使用。
但是当前遇到一些问题:
由于部署阶段也需要重新编译,导致做rpm包时需要打包源码文件,但是由于rpm包一般只能包括:

  1. 可执行文件
  2. .so .a文件
  3. service服务文件
  4. 配置文件和脚本等

所以,当前这个状态下不能将DCache合入到openEuler中。

一些疑惑:
所以我们需要搞清楚为什么install.sh中会再次进行:cmake .. -DTARS_WEB_HOST=WEBHOST−DTARSTOKEN={WEB_TOKEN}
这个部署里面的编译与第一步骤中的编译:mkdir build; cd build; cmake ..; make; make release; make tar 有什么差别?
能不能在第一步编译编译后,install.sh中不再编译,是否可以通过其它配置方式来配置WEB_HOST等?

总结:当前DCache能否比较优雅地打包为一个rpm包,在部署阶段不需要重新编译,rpm包中包含所有需要编译的结果文件?

https://gitee.com/src-openeuler/DCache/pulls/1

make failed

环境:Centos7 虚拟机, 虚拟内存2048M,单核处理器

[ 60%] Building CXX object src/OptServer/CMakeFiles/DCacheOptServer.dir/DCacheOptImp.cpp.o
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See http://bugzilla.redhat.com/bugzilla for instructions.
make[2]: *** [src/OptServer/CMakeFiles/DCacheOptServer.dir/DCacheOptImp.cpp.o] Error 4
make[1]: *** [src/OptServer/CMakeFiles/DCacheOptServer.dir/all] Error 2
make: *** [all] Error 2

编译的速度相当慢

服务创建->发布服务报错

弹出框错误:
1 第一次错误
错误: installApp catch execption:insert relation info catch exception:[TC_Mysql::connect]: mysql_real_connect: Unknown database 'db_dcache_relation'
2 关闭第一次错误后,再次点击发布服务
报错:
错误: installApp catch execption:insert server name:DCache.DcacheTest1RouterServer catch exception:[TC_Mysql::execute]: mysql_query: [ insert into t_config_files (config,config_flag,filename,host,lastuser,level,posttime,server_name) values ('
\n # 应用名称\n AppName=DcacheTest1\n # 数据库配置重新装载最小间隔时间\n DbReloadTime=300000\n # 管理接口的Obj\n AdminRegObj=tars.tarsregistry.AdminRegObj\n \n # 是否开启ETCD为Router集群(Router集群需要利用ETCD来做选举)\n enable=N\n # 所有ETCD机器的IP地址,以分号分割\n host=x.x.x.x:port;x.x.x.x:port\n # ETCD通信请求的超时时间(秒)\n RequestTimeout=3\n # Router主机心跳的维持时间(秒)\n EtcdHbTTL=60\n \n \n # 清理代理的最近未访问时间\n ProxyMaxSilentTime=1800\n # 清理代理的间隔时间\n ClearProxyInterval=1800\n # 轮询迁移数据库的时间\n TransferInterval=3\n # 轮询线程数\n TimerThreadSize=20\n # 等待页迁移的超时时间(毫秒)\n TransferTimeOut=3000\n # 迁移时隔多少页整理一下数据库记录\n TransferDefragDbInterval=50\n # 重新执行迁移指令的时间间隔(秒)\n RetryTransferInterval=1\n # 迁移失败时的最大重试次数\n RetryTransferMaxTimes=3\n # 一次迁移页数\n TransferPagesOnce=10\n # 每个组分配的最小迁移线程数\n MinTransferThreadEachGroup=5\n # 每个组分配的最大迁移线程数\n MaxTransferThreadEachGroup=8\n \n \n # 是否开启cache主备自动切换\n enable=N\n # 自动切换超时的检测间隔(秒)\n SwitchCheckInterval= 10\n # 自动切换的超时时间(秒)\n SwitchTimeOut=60\n # 自动切换执行的线程数(默认1个)\n SwitchThreadSize=50\n # 备机不可读的超时时间(秒)\n SlaveTimeOut=60\n # 主备切换时,主备机binlog差异的阈值(毫秒)\n SwitchBinLogDiffLimit=300\n # 一天当中主备切换的最大次数\n SwitchMaxTimes=3\n # 主备切换时等待主机降级的时间(秒)\n DowngradeTimeout=30\n \n \n \n charset=utf8\n dbname=db_cache_DcacheTest1\n dbhost=172.25.0.2\n dbpass=123456\n dbport=3306\n dbuser=root\n \n \n charset=utf8mb4\n dbname=db_dcache_relation\n dbhost=172.25.0.2\n dbpass=123456\n dbport=3306\n dbuser=root\n \n \n
\n',0,'DcacheTest1RouterServer.conf','','system',2,'2021-06-24 09:58:41','DCache.DcacheTest1RouterServer') ] :Duplicate entry 'DCache.DcacheTest1RouterServer-DcacheTest1RouterServer.conf--2--' for key 'application'

DCache make 失败

make 报错
环境:
gcc 版本 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC)
CentOS Linux release 7.7.1908 (Core)

[ 70%] Building CXX object test/Proxy/CMakeFiles/libProxy.dir/__/__/src/Proxy/StatThread.cpp.o
[ 71%] Building CXX object test/Proxy/CMakeFiles/libProxy.dir/__/__/src/Proxy/TimerThread.cpp.o
[ 71%] Linking CXX static library ../../lib/liblibProxy.a
[ 71%] Built target libProxy
Scanning dependencies of target test-TimerThreadTest
[ 71%] Building CXX object test/Proxy/CMakeFiles/test-TimerThreadTest.dir/TimerThreadTest.cpp.o
[ 72%] Linking CXX executable ../../bin/test-TimerThreadTest
../../lib/liblibProxy.a(ProxyImp.cpp.o):在函数‘CacheCallbackComm::getThreadData()’中:
ProxyImp.cpp:(.text._ZN17CacheCallbackComm13getThreadDataEv[_ZN17CacheCallbackComm13getThreadDataEv]+0x13):对‘pthread_getspecific’未定义的引用
ProxyImp.cpp:(.text._ZN17CacheCallbackComm13getThreadDataEv[_ZN17CacheCallbackComm13getThreadDataEv]+0x13b):对‘pthread_setspecific’未定义的引用
../../lib/liblibProxy.a(ProxyImp.cpp.o):在函数‘int CacheCallbackComm::getCacheProxy<tars::TC_AutoPtr<DCache::MKCacheProxy> >(std::string const&, std::string const&, std::string&, tars::TC_AutoPtr<DCache::MKCacheProxy>&, std::string const&)’中:
ProxyImp.cpp:(.text._ZN17CacheCallbackComm13getCacheProxyIN4tars10TC_AutoPtrIN6DCache12MKCacheProxyEEEEEiRKSsS7_RSsRT_S7_[_ZN17CacheCallbackComm13getCacheProxyIN4tars10TC_AutoPtrIN6DCache12MKCacheProxyEEEEEiRKSsS7_RSsRT_S7_]+0x27):对‘pthread_getspecific’未定义的引用
ProxyImp.cpp:(.text._ZN17CacheCallbackComm13getCacheProxyIN4tars10TC_AutoPtrIN6DCache12MKCacheProxyEEEEEiRKSsS7_RSsRT_S7_[_ZN17CacheCallbackComm13getCacheProxyIN4tars10TC_AutoPtrIN6DCache12MKCacheProxyEEEEEiRKSsS7_RSsRT_S7_]+0x19e):对‘pthread_setspecific’未定义的引用
../../lib/liblibProxy.a(ProxyImp.cpp.o):在函数‘int CacheCallbackComm::getWCacheProxy<tars::TC_AutoPtr<DCache::MKWCacheProxy> >(std::string const&, std::string const&, std::string&, tars::TC_AutoPtr<DCache::MKWCacheProxy>&)’中:
ProxyImp.cpp:(.text._ZN17CacheCallbackComm14getWCacheProxyIN4tars10TC_AutoPtrIN6DCache13MKWCacheProxyEEEEEiRKSsS7_RSsRT_[_ZN17CacheCallbackComm14getWCacheProxyIN4tars10TC_AutoPtrIN6DCache13MKWCacheProxyEEEEEiRKSsS7_RSsRT_]+0x24):对‘pthread_getspecific’未定义的引用
ProxyImp.cpp:(.text._ZN17CacheCallbackComm14getWCacheProxyIN4tars10TC_AutoPtrIN6DCache13MKWCacheProxyEEEEEiRKSsS7_RSsRT_[_ZN17CacheCallbackComm14getWCacheProxyIN4tars10TC_AutoPtrIN6DCache13MKWCacheProxyEEEEEiRKSsS7_RSsRT_]+0x183):对‘pthread_setspecific’未定义的引用
../../lib/liblibProxy.a(ProxyImp.cpp.o):在函数‘CacheCallbackComm::reportException(std::string const&)’中:
ProxyImp.cpp:(.text._ZN17CacheCallbackComm15reportExceptionERKSs[_ZN17CacheCallbackComm15reportExceptionERKSs]+0x1e):对‘pthread_getspecific’未定义的引用
ProxyImp.cpp:(.text._ZN17CacheCallbackComm15reportExceptionERKSs[_ZN17CacheCallbackComm15reportExceptionERKSs]+0x183):对‘pthread_setspecific’未定义的引用
../../lib/liblibProxy.a(ProxyImp.cpp.o):在函数‘CacheCallbackComm::doResponse(int, std::string const&, StatType, tars::TC_AutoPtr<Responser>)’中:
ProxyImp.cpp:(.text._ZN17CacheCallbackComm10doResponseEiRKSs8StatTypeN4tars10TC_AutoPtrI9ResponserEE[_ZN17CacheCallbackComm10doResponseEiRKSs8StatTypeN4tars10TC_AutoPtrI9ResponserEE]+0x9a):对‘pthread_getspecific’未定义的引用
ProxyImp.cpp:(.text._ZN17CacheCallbackComm10doResponseEiRKSs8StatTypeN4tars10TC_AutoPtrI9ResponserEE[_ZN17CacheCallbackComm10doResponseEiRKSs8StatTypeN4tars10TC_AutoPtrI9ResponserEE]+0x337):对‘pthread_setspecific’未定义的引用
../../lib/liblibProxy.a(ProxyImp.cpp.o):在函数‘GetKVCallback::callback_getKV(int, DCache::GetKVRsp const&)’中:
ProxyImp.cpp:(.text._ZN13GetKVCallback14callback_getKVEiRKN6DCache8GetKVRspE[_ZN13GetKVCallback14callback_getKVEiRKN6DCache8GetKVRspE]+0x53d):对‘pthread_getspecific’未定义的引用
ProxyImp.cpp:(.text._ZN13GetKVCallback14callback_getKVEiRKN6DCache8GetKVRspE[_ZN13GetKVCallback14callback_getKVEiRKN6DCache8GetKVRspE]+0x920):对‘pthread_setspecific’未定义的引用
../../lib/liblibProxy.a(ProxyImp.cpp.o):在函数‘SetKVCallback::callback_setKV(int)’中:
ProxyImp.cpp:(.text._ZN13SetKVCallback14callback_setKVEi[_ZN13SetKVCallback14callback_setKVEi]+0x4bd):对‘pthread_getspecific’未定义的引用
ProxyImp.cpp:(.text._ZN13SetKVCallback14callback_setKVEi[_ZN13SetKVCallback14callback_setKVEi]+0x8a5):对‘pthread_setspecific’未定义的引用
../../lib/liblibProxy.a(ProxyImp.cpp.o):在函数‘InsertKVCallback::callback_insertKV(int)’中:
ProxyImp.cpp:(.text._ZN16InsertKVCallback17callback_insertKVEi[_ZN16InsertKVCallback17callback_insertKVEi]+0x4bd):对‘pthread_getspecific’未定义的引用
ProxyImp.cpp:(.text._ZN16InsertKVCallback17callback_insertKVEi[_ZN16InsertKVCallback17callback_insertKVEi]+0x8a5):对‘pthread_setspecific’未定义的引用
../../lib/liblibProxy.a(ProxyImp.cpp.o):在函数‘UpdateKVCallback::callback_updateKV(int, DCache::UpdateKVRsp const&)’中:
ProxyImp.cpp:(.text._ZN16UpdateKVCallback17callback_updateKVEiRKN6DCache11UpdateKVRspE[_ZN16UpdateKVCallback17callback_updateKVEiRKN6DCache11UpdateKVRspE]+0x45d):对‘pthread_getspecific’未定义的引用
ProxyImp.cpp:(.text._ZN16UpdateKVCallback17callback_updateKVEiRKN6DCache11UpdateKVRspE[_ZN16UpdateKVCallback17callback_updateKVEiRKN6DCache11UpdateKVRspE]+0x84e):对‘pthread_setspecific’未定义的引用
../../lib/liblibProxy.a(ProxyImp.cpp.o):在函数‘EraseKVCallback::callback_eraseKV(int)’中:
ProxyImp.cpp:(.text._ZN15EraseKVCallback16callback_eraseKVEi[_ZN15EraseKVCallback16callback_eraseKVEi]+0x4ce):对‘pthread_getspecific’未定义的引用
ProxyImp.cpp:(.text._ZN15EraseKVCallback16callback_eraseKVEi[_ZN15EraseKVCallback16callback_eraseKVEi]+0x78a):对‘pthread_setspecific’未定义的引用
../../lib/liblibProxy.a(ProxyImp.cpp.o):在函数‘DelKVCallback::callback_delKV(int)’中:
ProxyImp.cpp:(.text._ZN13DelKVCallback14callback_delKVEi[_ZN13DelKVCallback14callback_delKVEi]+0x4ce):对‘pthread_getspecific’未定义的引用
ProxyImp.cpp:(.text._ZN13DelKVCallback14callback_delKVEi[_ZN13DelKVCallback14callback_delKVEi]+0x78a):对‘pthread_setspecific’未定义的引用
../../lib/liblibProxy.a(ProxyImp.cpp.o):在函数‘GetZSetScoreCallback::callback_getZSetScore(int, double)’中:
ProxyImp.cpp:(.text._ZN20GetZSetScoreCallback21callback_getZSetScoreEid[_ZN20GetZSetScoreCallback21callback_getZSetScoreEid]+0x4d7):对‘pthread_getspecific’未定义的引用
ProxyImp.cpp:(.text._ZN20GetZSetScoreCallback21callback_getZSetScoreEid[_ZN20GetZSetScoreCallback21callback_getZSetScoreEid]+0x8a8):对‘pthread_setspecific’未定义的引用
../../lib/liblibProxy.a(CacheCallbackComm.cpp.o):在函数‘ThreadKey::KeyInitialize::~KeyInitialize()’中:
CacheCallbackComm.cpp:(.text._ZN9ThreadKey13KeyInitializeD2Ev[_ZN9ThreadKey13KeyInitializeD5Ev]+0xa):对‘pthread_key_delete’未定义的引用
../../lib/liblibProxy.a(CacheCallbackComm.cpp.o):在函数‘ThreadKey::KeyInitialize::KeyInitialize()’中:
CacheCallbackComm.cpp:(.text._ZN9ThreadKey13KeyInitializeC2Ev[_ZN9ThreadKey13KeyInitializeC5Ev]+0x17):对‘pthread_key_create’未定义的引用
/usr/local/tars/cpp/thirdparty/lib64/libgtest.a(gtest-all.cc.o):在函数‘testing::internal::ThreadLocal<testing::TestPartResultReporterInterface*>::~ThreadLocal()’中:
gtest-all.cc:(.text._ZN7testing8internal11ThreadLocalIPNS_31TestPartResultReporterInterfaceEED2Ev[_ZN7testing8internal11ThreadLocalIPNS_31TestPartResultReporterInterfaceEED5Ev]+0x15):对‘pthread_getspecific’未定义的引用
gtest-all.cc:(.text._ZN7testing8internal11ThreadLocalIPNS_31TestPartResultReporterInterfaceEED2Ev[_ZN7testing8internal11ThreadLocalIPNS_31TestPartResultReporterInterfaceEED5Ev]+0x2a):对‘pthread_key_delete’未定义的引用
/usr/local/tars/cpp/thirdparty/lib64/libgtest.a(gtest-all.cc.o):在函数‘testing::internal::ThreadLocal<std::vector<testing::internal::TraceInfo, std::allocator<testing::internal::TraceInfo> > >::~ThreadLocal()’中:
gtest-all.cc:(.text._ZN7testing8internal11ThreadLocalISt6vectorINS0_9TraceInfoESaIS3_EEED2Ev[_ZN7testing8internal11ThreadLocalISt6vectorINS0_9TraceInfoESaIS3_EEED5Ev]+0x15):对‘pthread_getspecific’未定义的引用
gtest-all.cc:(.text._ZN7testing8internal11ThreadLocalISt6vectorINS0_9TraceInfoESaIS3_EEED2Ev[_ZN7testing8internal11ThreadLocalISt6vectorINS0_9TraceInfoESaIS3_EEED5Ev]+0x2a):对‘pthread_key_delete’未定义的引用
/usr/local/tars/cpp/thirdparty/lib64/libgtest.a(gtest-all.cc.o):在函数‘testing::internal::ThreadLocal<std::vector<testing::internal::TraceInfo, std::allocator<testing::internal::TraceInfo> > >::GetOrCreateValue() const’中:
gtest-all.cc:(.text._ZNK7testing8internal11ThreadLocalISt6vectorINS0_9TraceInfoESaIS3_EEE16GetOrCreateValueEv[_ZNK7testing8internal11ThreadLocalISt6vectorINS0_9TraceInfoESaIS3_EEE16GetOrCreateValueEv]+0x16):对‘pthread_getspecific’未定义的引用
gtest-all.cc:(.text._ZNK7testing8internal11ThreadLocalISt6vectorINS0_9TraceInfoESaIS3_EEE16GetOrCreateValueEv[_ZNK7testing8internal11ThreadLocalISt6vectorINS0_9TraceInfoESaIS3_EEE16GetOrCreateValueEv]+0x79):对‘pthread_setspecific’未定义的引用
/usr/local/tars/cpp/thirdparty/lib64/libgtest.a(gtest-all.cc.o):在函数‘testing::internal::ThreadLocal<testing::TestPartResultReporterInterface*>::CreateKey()’中:
gtest-all.cc:(.text._ZN7testing8internal11ThreadLocalIPNS_31TestPartResultReporterInterfaceEE9CreateKeyEv[_ZN7testing8internal11ThreadLocalIPNS_31TestPartResultReporterInterfaceEE9CreateKeyEv]+0x16):对‘pthread_key_create’未定义的引用
/usr/local/tars/cpp/thirdparty/lib64/libgtest.a(gtest-all.cc.o):在函数‘testing::internal::ThreadLocal<std::vector<testing::internal::TraceInfo, std::allocator<testing::internal::TraceInfo> > >::CreateKey()’中:
gtest-all.cc:(.text._ZN7testing8internal11ThreadLocalISt6vectorINS0_9TraceInfoESaIS3_EEE9CreateKeyEv[_ZN7testing8internal11ThreadLocalISt6vectorINS0_9TraceInfoESaIS3_EEE9CreateKeyEv]+0x16):对‘pthread_key_create’未定义的引用
/usr/local/tars/cpp/thirdparty/lib64/libgtest.a(gtest-all.cc.o):在函数‘testing::internal::ThreadLocal<testing::TestPartResultReporterInterface*>::GetOrCreateValue() const’中:
gtest-all.cc:(.text._ZNK7testing8internal11ThreadLocalIPNS_31TestPartResultReporterInterfaceEE16GetOrCreateValueEv[_ZNK7testing8internal11ThreadLocalIPNS_31TestPartResultReporterInterfaceEE16GetOrCreateValueEv]+0x16):对‘pthread_getspecific’未定义的引用
gtest-all.cc:(.text._ZNK7testing8internal11ThreadLocalIPNS_31TestPartResultReporterInterfaceEE16GetOrCreateValueEv[_ZNK7testing8internal11ThreadLocalIPNS_31TestPartResultReporterInterfaceEE16GetOrCreateValueEv]+0x79):对‘pthread_setspecific’未定义的引用
collect2: 错误:ld 返回 1
make[2]: *** [bin/test-TimerThreadTest] 错误 1
make[1]: *** [test/Proxy/CMakeFiles/test-TimerThreadTest.dir/all] 错误 2
make: *** [all] 错误 2

limit排序分页

请问类似分页的limit 支持某个字段排序分页吗 看了下源码 好像 不支持某个字段排序分页
都是从hash_map中取的 存储的顺序就是按写入hash_map的顺序吗, 取也是按存储的顺序取的吗

DCache部署过程的一些疑问

  1. Cache模块的部署目前只有主备模式吗?是否支持对主备节点进行扩容?
  2. DbAccess对接后端存储有计划出操作文档吗?
  3. 是否有计划组建交流讨论群?

EraseThread CPU 100%

kkv的模式下,EraseThread 在只有一个mainkey 装满内存,会死loop。 请问应该怎样处理

tc_multi_hashmap_malloc.cpp:8626
// 将脏数据移动到get链的头部,使可以继续淘汰
if (_pHead->_iGetHead == iAddr)
{
// 既是头也是尾,只有一个元素了
return RT_OK;
}

安装失败

2021-01-08 14:48:48 ====================================================================
2021-01-08 14:48:48 ===dcache-install****===
2021-01-08 14:48:48 ====================================================================
2021-01-08 14:48:48 ===>print config info >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2021-01-08 14:48:48 PARAMS: 172.16.10.180 3306 root 123456 172.16.10.180 3306 root 123456 true 172.16.10.180:3000 7677d4ecb9a7d5c6c3013defd8ff35ea12b1d618 172.16.10.180
2021-01-08 14:48:48 TARS_MYSQL_IP: 172.16.10.180
2021-01-08 14:48:48 TARS_MYSQL_PORT: 3306
2021-01-08 14:48:48 TARS_MYSQL_USER: root
2021-01-08 14:48:48 TARS_MYSQL_PASSWORD: 123456
2021-01-08 14:48:48 DCACHE_MYSQL_IP: 172.16.10.180
2021-01-08 14:48:48 DCACHE_MYSQL_PORT: 3306
2021-01-08 14:48:48 DCACHE_MYSQL_USER: root
2021-01-08 14:48:48 DCACHE_MYSQL_PASSWORD: 123456
2021-01-08 14:48:48 CREATE: true
2021-01-08 14:48:48 WEB_HOST: 172.16.10.180:3000
2021-01-08 14:48:48 WEB_TOKEN: 7677d4ecb9a7d5c6c3013defd8ff35ea12b1d618
2021-01-08 14:48:48 WORKDIR: /data/soft/soft/DCache-master/deploy
2021-01-08 14:48:48 NODE_IP: 172.16.10.180
2021-01-08 14:48:48 ===<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< print config info finish.


CMAKE_SOURCE_DIR: /data/soft/soft/DCache-master
CMAKE_BINARY_DIR: /data/soft/soft/DCache-master/build
PROJECT_SOURCE_DIR: /data/soft/soft/DCache-master
CMAKE_BUILD_TYPE: Release
PLATFORM: linux
TARS2CPP: /usr/local/tars/cpp/tools/tars2cpp
TARS_MYSQL: ON
TARS_HTTP2: OFF
TARS_SSL: OFF
TARS_WEB_HOST: 172.16.10.180:3000
TARS_TOKEN: 7677d4ecb9a7d5c6c3013defd8ff35ea12b1d618

in src CombinDbAccessServer...
-- Configuring done
-- Generating done
-- Build files have been written to: /data/soft/soft/DCache-master/build
tar: Removing leading /' from member names tar: /data/soft/soft/DCache-master/build/ConfigServer: Cannot stat: No such file or directory tar: Exiting with failure status due to previous errors tar: Removing leading /' from member names
tar: /data/soft/soft/DCache-master/build/CombinDbAccessServer: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
DCacheServerGroup/
DCacheServerGroup/KVCacheServer
DCacheServerGroup/
DCacheServerGroup/KVCacheServer
DCacheServerGroup/
DCacheServerGroup/MKVCacheServer
DCacheServerGroup/
DCacheServerGroup/MKVCacheServer
tar: Removing leading /' from member names tar: /data/soft/soft/DCache-master/build/DCacheOptServer: Cannot stat: No such file or directory tar: Exiting with failure status due to previous errors tar: Removing leading /' from member names
tar: /data/soft/soft/DCache-master/build/PropertyServer: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
tar: Removing leading /' from member names tar: /data/soft/soft/DCache-master/build/ProxyServer: Cannot stat: No such file or directory tar: Exiting with failure status due to previous errors tar: Removing leading /' from member names
tar: /data/soft/soft/DCache-master/build/RouterServer: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
tar: Removing leading /' from member names tar: /data/soft/soft/DCache-master/build/ConfigServer: Cannot stat: No such file or directory tar: Exiting with failure status due to previous errors tar: Removing leading /' from member names
tar: /data/soft/soft/DCache-master/build/CombinDbAccessServer: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
DCacheServerGroup/
DCacheServerGroup/KVCacheServer
DCacheServerGroup/
DCacheServerGroup/KVCacheServer
DCacheServerGroup/
DCacheServerGroup/MKVCacheServer
DCacheServerGroup/
DCacheServerGroup/MKVCacheServer
tar: Removing leading /' from member names tar: /data/soft/soft/DCache-master/build/DCacheOptServer: Cannot stat: No such file or directory tar: Exiting with failure status due to previous errors tar: Removing leading /' from member names
tar: /data/soft/soft/DCache-master/build/PropertyServer: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
tar: Removing leading /' from member names tar: /data/soft/soft/DCache-master/build/ProxyServer: Cannot stat: No such file or directory tar: Exiting with failure status due to previous errors tar: Removing leading /' from member names
tar: /data/soft/soft/DCache-master/build/RouterServer: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
Built target tar
2021-01-08 14:48:54 ===>install DCacheOptServer:
{"data":{"server_conf":{"id":52,"application":"DCache","server_name":"DCacheOptServer","node_name":"172.16.10.180","server_type":"tars_cpp","enable_set":false,"set_name":null,"set_area":null,"set_group":null,"setting_state":"inactive","present_state":"inactive","bak_flag":false,"template_name":"tars.default","profile":"","async_thread_num":3,"base_path":"","exe_path":"","start_script_path":"","stop_script_path":"","monitor_script_path":"","patch_time":"1970-01-01T05:00:00.000Z","patch_version":"","process_id":0,"posttime":"2021-01-08 01:38:21"},"tars_node_rst":[]},"ret_code":200,"err_msg":""}
2021-01-08 14:48:54
2021-01-08 14:48:54 ===>install DCacheConfigServer:
{"data":{"server_conf":{"id":53,"application":"DCache","server_name":"ConfigServer","node_name":"172.16.10.180","server_type":"tars_cpp","enable_set":false,"set_name":null,"set_area":null,"set_group":null,"setting_state":"inactive","present_state":"inactive","bak_flag":false,"template_name":"tars.default","profile":"","async_thread_num":3,"base_path":"","exe_path":"","start_script_path":"","stop_script_path":"","monitor_script_path":"","patch_time":"1970-01-01T05:00:00.000Z","patch_version":"","process_id":0,"posttime":"2021-01-08 01:38:21"},"tars_node_rst":[]},"ret_code":200,"err_msg":""}
2021-01-08 14:48:54
2021-01-08 14:48:54 ===>install PropertyServer:
{"data":{"server_conf":{"id":54,"application":"DCache","server_name":"PropertyServer","node_name":"172.16.10.180","server_type":"tars_cpp","enable_set":false,"set_name":null,"set_area":null,"set_group":null,"setting_state":"inactive","present_state":"inactive","bak_flag":false,"template_name":"DCache.Cache","profile":"","async_thread_num":3,"base_path":"","exe_path":"","start_script_path":"","stop_script_path":"","monitor_script_path":"","patch_time":"1970-01-01T05:00:00.000Z","patch_version":"","process_id":0,"posttime":"2021-01-08 01:38:21"},"tars_node_rst":[]},"ret_code":200,"err_msg":""}
2021-01-08 14:48:54
2021-01-08 14:48:54 ===>install DCacheOptServer.conf:
{"data":{"id":1,"server_name":"DCache.DCacheOptServer","set_name":"","set_area":"","node_name":"","set_group":"","filename":"DCacheOptServer.conf","config":"

\n # admin registry obj\n AdminRegObj = tars.tarsAdminRegistry.AdminRegObj\n \n \n charset = utf8mb4\n dbname = db_tars\n dbhost = 172.16.10.180\n dbport = 3306\n dbuser = root\n dbpass = 123456\n \n \n charset = utf8mb4\n dbname = db_dcache_relation\n dbhost = 172.16.10.180\n dbport = 3306\n dbuser = root\n dbpass = 123456\n \n \n \n # 发布服务线程数\n ThreadCount = 5\n \n \n # 通知node下线服务超时时间(秒)\n Timeout = 20\n # 下线服务备份目录\n BakPath = /data/dcacheuninstall/\n # 下线服务线程数\n ThreadCount = 2\n \n ","level":2,"posttime":"2021-01-08 01:38:21","lastuser":null},"ret_code":200,"err_msg":""}
2021-01-08 14:48:54
2021-01-08 14:48:54 ===>install ConfigServer.conf:
{"data":{"id":3,"server_name":"DCache.ConfigServer","set_name":"","set_area":"","node_name":"","set_group":"","filename":"ConfigServer.conf","config":"\n \n dbhost= 172.16.10.180\n dbpass= 123456\n dbuser= root\n dbname= db_dcache_relation\n charset=utf8mb4\n dbport= 3306\n \n ","level":2,"posttime":"2021-01-08 01:38:21","lastuser":null},"ret_code":200,"err_msg":""}
2021-01-08 14:48:54
2021-01-08 14:48:54 ===>install PropertyServer.conf:
{"data":{"id":5,"server_name":"DCache.PropertyServer","set_name":"","set_area":"","node_name":"","set_group":"","filename":"PropertyServer.conf","config":"\n \n #可监控属性数量的最大值\n PropertyFieldNum=48\n TbNamePre=t_property_realtime\n AppName=dcache_idc5min_147\n #特性监控数据库信息\n \n dbhost=172.16.10.180\n dbname=db_dcache_property\n dbuser=root\n dbpass=123456\n dbport=3306\n charset=utf8mb4\n \n #db_dcache_relation的数据库信息\n \n charset=utf8mb4\n dbname=db_dcache_relation\n dbhost=172.16.10.180\n dbpass=123456\n dbport=3306\n dbuser=root\n \n \n \n #数据入库的时间间隔,单位分钟\n InsertInterval=5\n \n \n # value1 to value20 for obj and tars server fixed property\n CacheObjAdapter.queue = value1\n WCacheObjAdapter.queue = value2\n BinLogObjAdapter.queue = value3\n RouterClientObjAdapter.queue = value4\n ControlAckObjAdapter.queue = value5\n BackUpObjAdapter.queue = value6\n sendrspqueue = value7\n asyncqueue = value8\n memsize = value9\n reservedPro10 = value10\n reservedPro11 = value11\n reservedPro12 = value12\n reservedPro13 = value13\n reservedPro14 = value14\n reservedPro15 = value15\n reservedPro16 = value16\n reservedPro17 = value17\n reservedPro18 = value18\n reservedPro19 = value19\n reservedPro20 = value20\n # value21 for dcache property\n CacheMemSize_MB = value21\n DataMemUsage = value22\n CacheHitRatio = value23\n TotalCountOfRecords = value24\n ProportionOfDirtyRecords = value25\n CountOfDirtyRecords = value26\n CountOfOnlyKey = value27\n M/S_ReplicationErr = value28\n M/S_ReplicationLatency = value29\n CacheError = value30\n ProgramException = value31\n ReadRecordCount = value32\n WriteRecordCount = value33\n evictedRecordCount = value34\n evictedCountOfUnexpiredRecord = value35\n expiredRecordCount = value36\n ChunkUsedPerRecord = value37\n MaxMemUsageOfJmem = value38\n ProportionOfColdData = value39\n DbError = value40\n DbException = value41\n BackupError = value42\n MKV_MainkeyMemUsage = value43\n \n ","level":2,"posttime":"2021-01-08 01:38:22","lastuser":null},"ret_code":200,"err_msg":""}
2021-01-08 14:48:54
mysql: [Warning] Using a password on the command line interface can be insecure.
2021-01-08 14:48:55 exec_dcache create database db_dcache_relation, ret: 0
mysql: [Warning] Using a password on the command line interface can be insecure.
2021-01-08 14:48:55 exec_dcache create database db_dcache_property, ret: 0
mysql: [Warning] Using a password on the command line interface can be insecure.
2021-01-08 14:48:59 curl 172.16.10.180:3000/api/upload_and_publish?ticket=7677d4ecb9a7d5c6c3013defd8ff35ea12b1d618 [email protected] -Fapplication=DCache -Fmodule_name=ConfigServer -Fcomment=dcache-install
upload and patch err:TypeError: Cannot read property 'map' of undefined
2021-01-08 14:49:01 curl 172.16.10.180:3000/api/upload_and_publish?ticket=7677d4ecb9a7d5c6c3013defd8ff35ea12b1d618 [email protected] -Fapplication=DCache -Fmodule_name=DCacheOptServer -Fcomment=dcache-install
upload and patch err:TypeError: Cannot read property 'map' of undefined
2021-01-08 14:49:03 curl 172.16.10.180:3000/api/upload_and_publish?ticket=7677d4ecb9a7d5c6c3013defd8ff35ea12b1d618 [email protected] -Fapplication=DCache -Fmodule_name=PropertyServer -Fcomment=dcache-install
upload and patch err:TypeError: Cannot read property 'map' of undefined
2021-01-08 14:49:05 curl 172.16.10.180:3000/api/upload_patch_package?ticket=7677d4ecb9a7d5c6c3013defd8ff35ea12b1d618 [email protected] -Fapplication=DCache -Fmodule_name=RouterServer -Fcomment=dcache-install
{"data":{"id":85,"server":"DCache.RouterServer","tgz":"DCache.RouterServer_suse_1610087913327.tgz","comment":"dcache-install","posttime":"2021-01-08 01:38:33"},"ret_code":200,"err_msg":""}
2021-01-08 14:49:06 curl 172.16.10.180:3000/api/upload_patch_package?ticket=7677d4ecb9a7d5c6c3013defd8ff35ea12b1d618 [email protected] -Fapplication=DCache -Fmodule_name=CombinDbAccessServer -Fcomment=dcache-install
{"data":{"id":86,"server":"DCache.CombinDbAccessServer","tgz":"DCache.CombinDbAccessServer_suse_1610087913499.tgz","comment":"dcache-install","posttime":"2021-01-08 01:38:33"},"ret_code":200,"err_msg":""}
2021-01-08 14:49:06 curl 172.16.10.180:3000/api/upload_patch_package?ticket=7677d4ecb9a7d5c6c3013defd8ff35ea12b1d618 [email protected] -Fapplication=DCache -Fmodule_name=ProxyServer -Fcomment=dcache-install
{"data":{"id":87,"server":"DCache.ProxyServer","tgz":"DCache.ProxyServer_suse_1610087913698.tgz","comment":"dcache-install","posttime":"2021-01-08 01:38:33"},"ret_code":200,"err_msg":""}
2021-01-08 14:49:06 curl 172.16.10.180:3000/api/upload_patch_package?ticket=7677d4ecb9a7d5c6c3013defd8ff35ea12b1d618 [email protected] -Fapplication=DCache -Fmodule_name=DCacheServerGroup -Fcomment=dcache-install -Fpackage_type=1
{"data":{"id":88,"server":"DCache.DCacheServerGroup","tgz":"DCache.DCacheServerGroup_suse_1610087913893.tgz","comment":"dcache-install","posttime":"2021-01-08 01:38:33"},"ret_code":200,"err_msg":""}
2021-01-08 14:49:06 curl 172.16.10.180:3000/api/upload_patch_package?ticket=7677d4ecb9a7d5c6c3013defd8ff35ea12b1d618 [email protected] -Fapplication=DCache -Fmodule_name=DCacheServerGroup -Fcomment=dcache-install -Fpackage_type=2
{"data":{"id":89,"server":"DCache.DCacheServerGroup","tgz":"DCache.DCacheServerGroup_suse_1610087914050.tgz","comment":"dcache-install","posttime":"2021-01-08 01:38:34"},"ret_code":200,"err_msg":""}

这是脚本执行时的输出,DCache ConfigServer DCacheOptServer PropertyServer 这三个服务起不来,求大佬指教!!!
image

DCache make 时报错

[ 1%] Built target TarsComm
[ 3%] Built target tars-RouterServer
[ 8%] Built target RouterServer
[ 12%] Built target cache_comm
[ 13%] Built target tars-ConfigServer
[ 16%] Built target ConfigServer
[ 16%] Built target tars-CombinDbAccessServer
[ 19%] Built target CombinDbAccessServer
[ 22%] Built target tars-KVCacheServer
[ 34%] Built target KVCacheServer
[ 38%] Built target tars-MKVCacheServer
[ 53%] Built target MKVCacheServer
[ 53%] Built target tars-DCacheOptServer
[ 53%] Built target tars-PropertyServer
[ 56%] Built target PropertyServer
[ 56%] Built target tars-ProxyServer
[ 61%] Built target ProxyServer
[ 66%] Built target DCacheOptServer
[ 71%] Built target libProxy
[ 72%] Linking CXX executable ../../bin/test-TimerThreadTest
../../lib/liblibProxy.a(ProxyImp.cpp.o): In function CacheCallbackComm::getThreadData()': ProxyImp.cpp:(.text._ZN17CacheCallbackComm13getThreadDataEv[_ZN17CacheCallbackComm13getThreadDataEv]+0x13): undefined reference to pthread_getspecific'
ProxyImp.cpp:(.text._ZN17CacheCallbackComm13getThreadDataEv[_ZN17CacheCallbackComm13getThreadDataEv]+0x13b): undefined reference to pthread_setspecific' ../../lib/liblibProxy.a(ProxyImp.cpp.o): In function int CacheCallbackComm::getCacheProxy<tars::TC_AutoPtrDCache::MKCacheProxy >(std::string const&, std::string const&, std::string&, tars::TC_AutoPtrDCache::MKCacheProxy&, std::string const&)':
ProxyImp.cpp:(.text.ZN17CacheCallbackComm13getCacheProxyIN4tars10TC_AutoPtrIN6DCache12MKCacheProxyEEEEEiRKSsS7_RSsRT_S7[ZN17CacheCallbackComm13getCacheProxyIN4tars10TC_AutoPtrIN6DCache12MKCacheProxyEEEEEiRKSsS7_RSsRT_S7]+0x27): undefined reference to pthread_getspecific' ProxyImp.cpp:(.text._ZN17CacheCallbackComm13getCacheProxyIN4tars10TC_AutoPtrIN6DCache12MKCacheProxyEEEEEiRKSsS7_RSsRT_S7_[_ZN17CacheCallbackComm13getCacheProxyIN4tars10TC_AutoPtrIN6DCache12MKCacheProxyEEEEEiRKSsS7_RSsRT_S7_]+0x19e): undefined reference to pthread_setspecific'
../../lib/liblibProxy.a(ProxyImp.cpp.o): In function int CacheCallbackComm::getWCacheProxy<tars::TC_AutoPtr<DCache::MKWCacheProxy> >(std::string const&, std::string const&, std::string&, tars::TC_AutoPtr<DCache::MKWCacheProxy>&)': ProxyImp.cpp:(.text._ZN17CacheCallbackComm14getWCacheProxyIN4tars10TC_AutoPtrIN6DCache13MKWCacheProxyEEEEEiRKSsS7_RSsRT_[_ZN17CacheCallbackComm14getWCacheProxyIN4tars10TC_AutoPtrIN6DCache13MKWCacheProxyEEEEEiRKSsS7_RSsRT_]+0x24): undefined reference to pthread_getspecific'
ProxyImp.cpp:(.text.ZN17CacheCallbackComm14getWCacheProxyIN4tars10TC_AutoPtrIN6DCache13MKWCacheProxyEEEEEiRKSsS7_RSsRT[ZN17CacheCallbackComm14getWCacheProxyIN4tars10TC_AutoPtrIN6DCache13MKWCacheProxyEEEEEiRKSsS7_RSsRT]+0x183): undefined reference to pthread_setspecific' ../../lib/liblibProxy.a(ProxyImp.cpp.o): In function CacheCallbackComm::reportException(std::string const&)':
ProxyImp.cpp:(.text._ZN17CacheCallbackComm15reportExceptionERKSs[_ZN17CacheCallbackComm15reportExceptionERKSs]+0x1e): undefined reference to pthread_getspecific' ProxyImp.cpp:(.text._ZN17CacheCallbackComm15reportExceptionERKSs[_ZN17CacheCallbackComm15reportExceptionERKSs]+0x183): undefined reference to pthread_setspecific'
../../lib/liblibProxy.a(ProxyImp.cpp.o): In function CacheCallbackComm::doResponse(int, std::string const&, StatType, tars::TC_AutoPtr<Responser>)': ProxyImp.cpp:(.text._ZN17CacheCallbackComm10doResponseEiRKSs8StatTypeN4tars10TC_AutoPtrI9ResponserEE[_ZN17CacheCallbackComm10doResponseEiRKSs8StatTypeN4tars10TC_AutoPtrI9ResponserEE]+0x9a): undefined reference to pthread_getspecific'
ProxyImp.cpp:(.text._ZN17CacheCallbackComm10doResponseEiRKSs8StatTypeN4tars10TC_AutoPtrI9ResponserEE[_ZN17CacheCallbackComm10doResponseEiRKSs8StatTypeN4tars10TC_AutoPtrI9ResponserEE]+0x337): undefined reference to pthread_setspecific' ../../lib/liblibProxy.a(ProxyImp.cpp.o): In function GetKVCallback::callback_getKV(int, DCache::GetKVRsp const&)':
ProxyImp.cpp:(.text._ZN13GetKVCallback14callback_getKVEiRKN6DCache8GetKVRspE[_ZN13GetKVCallback14callback_getKVEiRKN6DCache8GetKVRspE]+0x53d): undefined reference to pthread_getspecific' ProxyImp.cpp:(.text._ZN13GetKVCallback14callback_getKVEiRKN6DCache8GetKVRspE[_ZN13GetKVCallback14callback_getKVEiRKN6DCache8GetKVRspE]+0x920): undefined reference to pthread_setspecific'
../../lib/liblibProxy.a(ProxyImp.cpp.o): In function SetKVCallback::callback_setKV(int)': ProxyImp.cpp:(.text._ZN13SetKVCallback14callback_setKVEi[_ZN13SetKVCallback14callback_setKVEi]+0x4bd): undefined reference to pthread_getspecific'
ProxyImp.cpp:(.text._ZN13SetKVCallback14callback_setKVEi[_ZN13SetKVCallback14callback_setKVEi]+0x8a5): undefined reference to pthread_setspecific' ../../lib/liblibProxy.a(ProxyImp.cpp.o): In function InsertKVCallback::callback_insertKV(int)':
ProxyImp.cpp:(.text._ZN16InsertKVCallback17callback_insertKVEi[_ZN16InsertKVCallback17callback_insertKVEi]+0x4bd): undefined reference to pthread_getspecific' ProxyImp.cpp:(.text._ZN16InsertKVCallback17callback_insertKVEi[_ZN16InsertKVCallback17callback_insertKVEi]+0x8a5): undefined reference to pthread_setspecific'
../../lib/liblibProxy.a(ProxyImp.cpp.o): In function UpdateKVCallback::callback_updateKV(int, DCache::UpdateKVRsp const&)': ProxyImp.cpp:(.text._ZN16UpdateKVCallback17callback_updateKVEiRKN6DCache11UpdateKVRspE[_ZN16UpdateKVCallback17callback_updateKVEiRKN6DCache11UpdateKVRspE]+0x45d): undefined reference to pthread_getspecific'
ProxyImp.cpp:(.text._ZN16UpdateKVCallback17callback_updateKVEiRKN6DCache11UpdateKVRspE[_ZN16UpdateKVCallback17callback_updateKVEiRKN6DCache11UpdateKVRspE]+0x84e): undefined reference to pthread_setspecific' ../../lib/liblibProxy.a(ProxyImp.cpp.o): In function EraseKVCallback::callback_eraseKV(int)':
ProxyImp.cpp:(.text._ZN15EraseKVCallback16callback_eraseKVEi[_ZN15EraseKVCallback16callback_eraseKVEi]+0x4ce): undefined reference to pthread_getspecific' ProxyImp.cpp:(.text._ZN15EraseKVCallback16callback_eraseKVEi[_ZN15EraseKVCallback16callback_eraseKVEi]+0x78a): undefined reference to pthread_setspecific'
../../lib/liblibProxy.a(ProxyImp.cpp.o): In function DelKVCallback::callback_delKV(int)': ProxyImp.cpp:(.text._ZN13DelKVCallback14callback_delKVEi[_ZN13DelKVCallback14callback_delKVEi]+0x4ce): undefined reference to pthread_getspecific'
ProxyImp.cpp:(.text._ZN13DelKVCallback14callback_delKVEi[_ZN13DelKVCallback14callback_delKVEi]+0x78a): undefined reference to pthread_setspecific' ../../lib/liblibProxy.a(ProxyImp.cpp.o): In function GetZSetScoreCallback::callback_getZSetScore(int, double)':
ProxyImp.cpp:(.text._ZN20GetZSetScoreCallback21callback_getZSetScoreEid[_ZN20GetZSetScoreCallback21callback_getZSetScoreEid]+0x4d7): undefined reference to pthread_getspecific' ProxyImp.cpp:(.text._ZN20GetZSetScoreCallback21callback_getZSetScoreEid[_ZN20GetZSetScoreCallback21callback_getZSetScoreEid]+0x8a8): undefined reference to pthread_setspecific'
../../lib/liblibProxy.a(CacheCallbackComm.cpp.o): In function ThreadKey::KeyInitialize::~KeyInitialize()': CacheCallbackComm.cpp:(.text._ZN9ThreadKey13KeyInitializeD2Ev[_ZN9ThreadKey13KeyInitializeD5Ev]+0xa): undefined reference to pthread_key_delete'
../../lib/liblibProxy.a(CacheCallbackComm.cpp.o): In function ThreadKey::KeyInitialize::KeyInitialize()': CacheCallbackComm.cpp:(.text._ZN9ThreadKey13KeyInitializeC2Ev[_ZN9ThreadKey13KeyInitializeC5Ev]+0x17): undefined reference to pthread_key_create'
/usr/local/tars/cpp/thirdparty/lib64/libgtest.a(gtest-all.cc.o): In function testing::internal::ThreadLocal<testing::TestPartResultReporterInterface*>::~ThreadLocal()': gtest-all.cc:(.text._ZN7testing8internal11ThreadLocalIPNS_31TestPartResultReporterInterfaceEED2Ev[_ZN7testing8internal11ThreadLocalIPNS_31TestPartResultReporterInterfaceEED5Ev]+0x15): undefined reference to pthread_getspecific'
gtest-all.cc:(.text._ZN7testing8internal11ThreadLocalIPNS_31TestPartResultReporterInterfaceEED2Ev[_ZN7testing8internal11ThreadLocalIPNS_31TestPartResultReporterInterfaceEED5Ev]+0x2a): undefined reference to pthread_key_delete' /usr/local/tars/cpp/thirdparty/lib64/libgtest.a(gtest-all.cc.o): In function testing::internal::ThreadLocal<std::vector<testing::internal::TraceInfo, std::allocatortesting::internal::TraceInfo > >::~ThreadLocal()':
gtest-all.cc:(.text._ZN7testing8internal11ThreadLocalISt6vectorINS0_9TraceInfoESaIS3_EEED2Ev[_ZN7testing8internal11ThreadLocalISt6vectorINS0_9TraceInfoESaIS3_EEED5Ev]+0x15): undefined reference to pthread_getspecific' gtest-all.cc:(.text._ZN7testing8internal11ThreadLocalISt6vectorINS0_9TraceInfoESaIS3_EEED2Ev[_ZN7testing8internal11ThreadLocalISt6vectorINS0_9TraceInfoESaIS3_EEED5Ev]+0x2a): undefined reference to pthread_key_delete'
/usr/local/tars/cpp/thirdparty/lib64/libgtest.a(gtest-all.cc.o): In function testing::internal::ThreadLocal<std::vector<testing::internal::TraceInfo, std::allocator<testing::internal::TraceInfo> > >::GetOrCreateValue() const': gtest-all.cc:(.text._ZNK7testing8internal11ThreadLocalISt6vectorINS0_9TraceInfoESaIS3_EEE16GetOrCreateValueEv[_ZNK7testing8internal11ThreadLocalISt6vectorINS0_9TraceInfoESaIS3_EEE16GetOrCreateValueEv]+0x16): undefined reference to pthread_getspecific'
gtest-all.cc:(.text._ZNK7testing8internal11ThreadLocalISt6vectorINS0_9TraceInfoESaIS3_EEE16GetOrCreateValueEv[_ZNK7testing8internal11ThreadLocalISt6vectorINS0_9TraceInfoESaIS3_EEE16GetOrCreateValueEv]+0x79): undefined reference to pthread_setspecific' /usr/local/tars/cpp/thirdparty/lib64/libgtest.a(gtest-all.cc.o): In function testing::internal::ThreadLocaltesting::TestPartResultReporterInterface*::CreateKey()':
gtest-all.cc:(.text._ZN7testing8internal11ThreadLocalIPNS_31TestPartResultReporterInterfaceEE9CreateKeyEv[_ZN7testing8internal11ThreadLocalIPNS_31TestPartResultReporterInterfaceEE9CreateKeyEv]+0x16): undefined reference to pthread_key_create' /usr/local/tars/cpp/thirdparty/lib64/libgtest.a(gtest-all.cc.o): In function testing::internal::ThreadLocal<std::vector<testing::internal::TraceInfo, std::allocatortesting::internal::TraceInfo > >::CreateKey()':
gtest-all.cc:(.text._ZN7testing8internal11ThreadLocalISt6vectorINS0_9TraceInfoESaIS3_EEE9CreateKeyEv[_ZN7testing8internal11ThreadLocalISt6vectorINS0_9TraceInfoESaIS3_EEE9CreateKeyEv]+0x16): undefined reference to pthread_key_create' /usr/local/tars/cpp/thirdparty/lib64/libgtest.a(gtest-all.cc.o): In function testing::internal::ThreadLocaltesting::TestPartResultReporterInterface*::GetOrCreateValue() const':
gtest-all.cc:(.text._ZNK7testing8internal11ThreadLocalIPNS_31TestPartResultReporterInterfaceEE16GetOrCreateValueEv[_ZNK7testing8internal11ThreadLocalIPNS_31TestPartResultReporterInterfaceEE16GetOrCreateValueEv]+0x16): undefined reference to pthread_getspecific' gtest-all.cc:(.text._ZNK7testing8internal11ThreadLocalIPNS_31TestPartResultReporterInterfaceEE16GetOrCreateValueEv[_ZNK7testing8internal11ThreadLocalIPNS_31TestPartResultReporterInterfaceEE16GetOrCreateValueEv]+0x79): undefined reference to pthread_setspecific'
collect2: error: ld returned 1 exit status
make[2]: *** [bin/test-TimerThreadTest] Error 1
make[1]: *** [test/Proxy/CMakeFiles/test-TimerThreadTest.dir/all] Error 2
make: *** [all] Error 2

Compile failed...

[root@test1 build]# make
Scanning dependencies of target TarsComm
[ 1%] /usr/local/tars/cpp/tools/tars2cpp --with-tars /code/DCache-master/src/TarsComm/CacheShare.tars
[ 1%] /usr/local/tars/cpp/tools/tars2cpp --with-tars /code/DCache-master/src/TarsComm/DbAccess.tars
[ 1%] /usr/local/tars/cpp/tools/tars2cpp --with-tars /code/DCache-master/src/TarsComm/ProxyShare.tars
[ 1%] Built target TarsComm
Scanning dependencies of target tars-RouterServer
[ 2%] /usr/local/tars/cpp/tools/tars2cpp --with-tars /code/DCache-master/src/Router/Router.tars
[ 2%] /usr/local/tars/cpp/tools/tars2cpp --with-tars /code/DCache-master/src/Router/RouterClient.tars
[ 3%] /usr/local/tars/cpp/tools/tars2cpp --with-tars /code/DCache-master/src/Router/RouterShare.tars
[ 3%] Built target tars-RouterServer
Scanning dependencies of target RouterServer
[ 3%] Building CXX object src/Router/CMakeFiles/RouterServer.dir/DbHandle.cpp.o
[ 3%] Building CXX object src/Router/CMakeFiles/RouterServer.dir/RouterImp.cpp.o
/code/DCache-master/src/Router/RouterImp.cpp: In member function ?€?virtual void RouterImp::initialize()?€?:
/code/DCache-master/src/Router/RouterImp.cpp:93:50: error: cannot call member function ?€?tars::TC_EpollServerPtr& tars::Application::getEpollServer()?€? without object
TC_Endpoint ep = Application::getEpollServer()->getBindAdapter(adapter)->getEndpoint();
^
make[2]: *** [src/Router/CMakeFiles/RouterServer.dir/RouterImp.cpp.o] Error 1
make[1]: *** [src/Router/CMakeFiles/RouterServer.dir/all] Error 2
make: *** [all] Error 2

KVCacheServer 编译错误

./jmem_hashmap_malloc/dcache_jmem_hashmap_malloc.h: In member function ‘int tars::HashMapMallocDCache<LockPolicy, StorePolicy>::eraseHashByForce(size_t, C)’:
./jmem_hashmap_malloc/dcache_jmem_hashmap_malloc.h:353:65: error: expected primary-expression before ‘>’ token
return _hashMapVec[h%_jmemNum]->eraseHashByForce(h, c);
^
./jmem_hashmap_malloc/dcache_jmem_hashmap_malloc.h: In member function ‘int tars::HashMapMallocDCache<LockPolicy, StorePolicy>::eraseHashByForce(size_t, C, std::vector<std::__cxx11::basic_string >&)’:
./jmem_hashmap_malloc/dcache_jmem_hashmap_malloc.h:359:63: error: expected primary-expression before ‘>’ token
return _hashMapVec[h%_jmemNum]->eraseHashByForce(h, c, vDelK);
^
./jmem_hashmap_malloc/dcache_jmem_hashmap_malloc.h: In member function ‘int tars::HashMapMallocDCache<LockPolicy, StorePolicy>::getHash(size_t, std::vector<std::pair<std::__cxx11::basic_string, std::__cxx11::basic_string > >&, C)’:
./jmem_hashmap_malloc/dcache_jmem_hashmap_malloc.h:365:54: error: expected primary-expression before ‘>’ token
return _hashMapVec[h%_jmemNum]->getHash(h, vv, c);
^
./jmem_hashmap_malloc/dcache_jmem_hashmap_malloc.h: In member function ‘int tars::HashMapMallocDCache<LockPolicy, StorePolicy>::getHash(size_t, std::vector<typename tars::JmemHashMapMalloc<LockPolicy, StorePolicy>::ToDoFunctor::DataRecord>&, C)’:
./jmem_hashmap_malloc/dcache_jmem_hashmap_malloc.h:371:54: error: expected primary-expression before ‘>’ token
return _hashMapVec[h%_jmemNum]->getHash(h, vv, c);
^
./jmem_hashmap_malloc/dcache_jmem_hashmap_malloc.h: In member function ‘int tars::HashMapMallocDCache<LockPolicy, StorePolicy>::getHashWithOnlyKey(size_t, std::vector<typename tars::JmemHashMapMalloc<LockPolicy, StorePolicy>::ToDoFunctor::DataRecord>&, C)’:
./jmem_hashmap_malloc/dcache_jmem_hashmap_malloc.h:377:65: error: expected primary-expression before ‘>’ token
return _hashMapVec[h%_jmemNum]->getHashWithOnlyKey(h, vv, c);
^
./jmem_hashmap_malloc/dcache_jmem_hashmap_malloc.h: In member function ‘int tars::HashMapMallocDCache<LockPolicy, StorePolicy>::syncOnce(uint32_t, C&)’:
./jmem_hashmap_malloc/dcache_jmem_hashmap_malloc.h:490:56: error: expected primary-expression before ‘>’ token
iRetVec[i] = _hashMapVec[i]->syncOnce(iNowTime, c);

启动KVCacheServer失败

日志说

exit: [TC_Config::parseFile]:fopen fail: /usr/local/app/tars/tarsnode/data/DCache.
DCacheAppLoginKVCacheServer1-1/bin//CacheServer.conf :No such file or directory
[fail] get remote config 'CacheServer.conf' error:remote config file is
 empty:CacheServer.conf

image

创建应用最后一步,点击安装发布无响应

下面是 DCacheOptServer 的错误日志
`2019-07-31 12:29:22|38786|ERROR|[TARS][QueryEpBase::doEndpoints, callback activeEps is empty,objname:DCache.PropertyServer.PropertyObj]
2019-07-31 12:29:27|38786|ERROR|[TARS][ObjectProxy::doTimeout, objname:DCache.PropertyServer.PropertyObj, queue timeout error]
2019-07-31 12:30:23|38786|ERROR|[TARS][QueryEpBase::doEndpoints, callback activeEps is empty,objname:DCache.PropertyServer.PropertyObj]
2019-07-31 12:30:28|38786|ERROR|[TARS][ObjectProxy::doTimeout, objname:DCache.PropertyServer.PropertyObj, queue timeout error]
Dcache应用安装失败

`

校验值接口日志有待改进

image
校验值接口日志在校验出错时,不打印哪个字段报错,导致字段较多时排查较为耗时,建议可以如截图将字段名也打印出来,体验更好

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.