Closed
Description
We are migrating our system from Redis++ to Boost.Redis. We have a problem processing a relatively large number (~800) of HSET requests. About 80 of them are processed successfully, and after them the client seems to disconnect and all of them failed with 'Operation canceled' error.
Any suggestions on how we can improve the implementation so that all our requests are processed without problems? The same use case works fine with Redis++.
A simplified version of our code:
auto stream = "stream";
for (const auto& [key, value]: map) {
auto req = make_shared<boost::redis::request>();
req.push("HSET", stream, key, payload(value));
_redis_client.async_exec(*req, boost::redis::ignore, [req](auto& ec, auto){ std::cerr<< (ec?"Failure":"Success") << '\n';}_
}
If we try to push all our changes in the same request and send it to redis only once, it always fails.
Metadata
Metadata
Assignees
Labels
No labels