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
[BUG] sql_cacher get incorrect string value, after restart opensips #2649
Comments
Any updates here? No progress has been made in the last 15 days, marking as stale. Will close this issue if no further updates are made in the next 30 days. |
Hello! I have the same problem on opensips 3.1:
and after this "sql_cacher" will not cache values and will always will return 16. Could you please check it? Thank you! |
+1 |
I have the same issue on 3.1, but I have no the same issue on 3.0 with the same script. |
In order to extract the commit diff between latest
... which produces: https://pastebin.com/e1H24uSS Out of these, there is one commit which stands out and seems directly related to the issue here:
Maybe this can serve as a good starting point as to what needs to be troubleshooted here. |
@liviuchircu Thank you. I tried to rollback these changes using next patch:
and it fixed the issue. |
Could you please fix it properly in code now? |
Logically speaking, only the Basically, I fail to see how the removal of the |
@bogdan-iancu Indeed, looking closer, it doesn't look like that commit could cause the issue. Perhaps the problem originated somewhere in the past, say here, in a commit which is both on
However, with more and more accumulation of "stuff to load" specifically targeted at worker #1's IPC startup queue in OpenSIPS |
@liviuchircu , that's more likely that this is the culprit commit. And if I understand you correctly, you say that doing the IPC from worker 1 may give a higher load latency than forcing the load on worker 1, as the IPC task (fired by worker 1) may be delayed (as handling) due the ongoing SIP traffic (while the forced load on |
Almost. What I'm trying to say is that the overall latency of loading the DB data is the same, coming from
So, overall, cacher is still fully ready after |
@nikbyte and @GangZhuo: could you try to place the This should reduce all startup delays to a minimum and ensure cacher is ready ASAP. And thanks to module dependencies, there should be no other ordering issues caused by this change (ideally!). Of course, this is not a permanent fix, but it should help you out while the issue is being solved. |
IMO, the position of the module at startup should be irrelevant, as the worker 1 is only firing the IPC job, a operation taking no time. I would say that the Y and Z are actually 0, as all the IPC jobs (data loading from different processes) are evenly distributed across all the workers, so done in parallel (of course, considering that the number of opensips procs >= modules loading via IPC). |
This is my fix: #2676 I don't know whether sql_res->col is available in all DB implementations, this PR is just a hint, maybe need more fix. |
Any updates here? No progress has been made in the last 15 days, marking as stale. Will close this issue if no further updates are made in the next 30 days. |
OpenSIPS version you are running
Describe the bug
sql_cacher get incorrect string value, after restart opensips.
To Reproduce
Example:
If we have a user with id=1000 and password="1234".
The sql_cacher automatically create a new redis key "passwd1000" with value "AAAAAA==EAAAAA==1234",
and $sql_cached_value(cache_passwd:password:1000) can get correct value "1234".
After restart the opensips, $sql_cached_value(cache_passwd:password:1000) get incorrect value "16".
Additional context
The text was updated successfully, but these errors were encountered: