-
Notifications
You must be signed in to change notification settings - Fork 347
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
[QUESTION] Holding pipeline objects in a container in RedisCluster mode #520
Comments
Made a small program to repeat the behavior. With this, the crash happens on the first key itself.
Output
|
Since I don't know how you implement Also please try-catch possible exceptions thrown by redis-plus-plus (you can have a try-catch block to protect the process_pair method), and print the exception error to see what happens. |
Thanks for your response. I fixed the difference in the lengths of The diff for
regards, |
Sorry, but I tried your code, and cannot reproduce your problem. Can you wrap your code with a try-catch block to see if any exception thrown by redis-plus-plus? You can output the error message, to see if something bad happens. Regards |
Thanks for your response. If it does not crash for you, that's a good sign for me - maybe some difference in the compiler version.
Compiler version:
|
Does it throw any exception when it crashes? i.e. any of your try-catch block catches any exception? If it does, please show me the error info. Also please check if you install multiple version of hiredis. If you do, uninstall all but keep only one of them. Otherwise, you might get some wired problem. I'm on vacation, and sorry for the late reply... Regards |
No error/exception seen. That is what make it harder to debug this issue.
To avoid this situation, I have stopped linking both the test app and the real app with hiredis-vip. And also moved to static linking with libredis++.a and libhiredis.a. With this, no other version of hiredis influences this executable. Menwhile, without using pipeline, our application is now working fine with Redis-plus-plus. The only issue is that we are not getting the performance that we were getting by using pipelining with hiredis-vip. |
I'd suggest you have a clean environment without hiredis-vip installed. Otherwise, you might get some wired problem. Like this issue mentioned. Regards |
Close the issue, since there's no update. Regards |
When trying to trying to replace hiredis-vip with Redis-plus-plus in our app, am observing a crash that is described below. Before that, our application uses Redis-cluster with (only) Lua scripts being run in pipeline mode. Currently, with hiredis-vip, a bunch of commands are batched using redisClusterAppendCommand and then redisClusterGetReplies is called for all of them, where each batch may target multiple cluster nodes. Based on my understanding of Redis-plus-plus, I am trying to prototype this as below.
While this works for a batch-size of 1, with batch-size of 2, Step 1 crashes when creating the second pipeline. I would like to understand if this approach of saving the Pipeline objects is even supported - because somewhere Redis-plus-plus documentation recommends to limit usage of pipeline objects within a block. If it is supported (even if not recommended), any suggestions/best-practices on this usage approach.
Environment:
Additional context
From the stack
bt
, it is seen to crash when copying (from assignment= operator) the unordered set in the QueuedRedis class. This was happening after the second redisCluster.pipeline(key) call but before the assignment to the object on the map completed.thanks,
The text was updated successfully, but these errors were encountered: