-
Notifications
You must be signed in to change notification settings - Fork 536
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
Add grayContent #76
Add grayContent #76
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deps下相关的修改还是去掉吧
deps 已经还原 @gaodq |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
用PHP7的grayContent我没有获取到相应数据,你们那里测试过可以吗?
manager/src/php/qconf_manager.cc
Outdated
std::vector<std::pair<std::string, std::string> >::iterator it; | ||
array_init(return_value); | ||
|
||
if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &gray_id, &$gray_id_len) == FAILURE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这行编不过
manager/src/php/qconf_manager.cc
Outdated
if (QCONF_OK != qconfzk->zk_gray_get_content(std::string(gray_id, gray_id_len), nodes)) RETURN_LONG(QCONF_PHP_ERROR); | ||
for (it = nodes.begin(); it != nodes.end(); ++it) | ||
{ | ||
add_assoc_string(return_value,(*it).first.c_str(),(char *)(*it).second.c_str()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个应该还是PHP7的函数吧,PHP5编不过
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我的错,docker环境出了问题,不严谨!
重新在php5和php7 环境下 测试通过 @gaodq ; 另外master 本地安装失败 QConf/deps/zookeeper/configure 的LIBTOOL的问题 |
感谢提交! |
新增了一个grayContent,通过灰度id返回,灰度结点的map; 另外发现在php 7.0.12 版本里 char * 这种字符串会报错,需要用zend_string; 其余的php7版本 又是正常的。