shawn246 / redis_client

a redis client supports cluster
71 stars 41 forks source link

Bug: if one salve instance run "cluster failover" in redis-cluster, then all operations on this node will fail #5

Open mwang-sticky opened 8 years ago

mwang-sticky commented 8 years ago

I simply fix it by: 563 int CRedisCommand::CmdRequest(redisContext _pContext) 564 { 565 if (m_nArgs <= 0) 566 return RC_PARAM_ERR; 567 568 if (!pContext) 569 return RC_RQST_ERR; 570 571 if (m_pReply) 572 { 573 freeReplyObject(m_pReply); 574 m_pReply = nullptr; 575 } 576 577 m_pReply = static_cast<redisReply >(redisCommandArgv(pContext, m_nArgs, (const char _)m_pszArgs, (const size_t *)m_pnArgsLen)); +578 return m_pReply ? (m_pReply->type != REDIS_REPLY_ERROR ? RC_SUCCESS : RC_RQST_ERR) : RC_RQST_ERR; 579 }

Please tell me if any errors

shawn246 commented 8 years ago

thank you so much , i will check this later

mwang-sticky commented 8 years ago

I though is there any API to check redis cluster status? like "cluster info"?

2016-06-16 18:12 GMT+08:00 shawn notifications@github.com:

thank you so much , i will check this later

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/shawn246/redis_client/issues/5#issuecomment-226444498, or mute the thread https://github.com/notifications/unsubscribe/ASqBphCFiHQwKiajTXjjzpMqeL8EKJBPks5qMSGcgaJpZM4IwQB6 .

Thanks! BestRegards! Min

Wang

School of EE&CS, Peking University Email: mwang98@gmail.com