Re: [sr-dev] [kamailio/kamailio] dispatcher : better distribution when using hash and destination is not available (#2363)

2020-07-09 Thread Kalki70
Hello, @henningw , Tthank you for your comment. I do really appreciate it. I must disagree on this : "But there might be scenarios were you don't want this rehashing done " YES, and that is why my proposal does not change current behavior. With no changes in config file, nothing changes. But

Re: [sr-dev] [kamailio/kamailio] dispatcher : better distribution when using hash and destination is not available (#2363)

2020-07-09 Thread Kalki70
Closed #2363. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/2363#event-3530500165___ Kamailio (SER) - Development Mailing List sr-dev@lis

Re: [sr-dev] [kamailio/kamailio] dispatcher : better distribution when using hash and destination is not available (#2363)

2020-07-09 Thread Kalki70
There are several misunderstanding of the code As I mentioned, I didn't find a function to do hash natively over an integer, so I used a string. I also asked, if there was any I could use, but received no answer. I guess std::hash is out of the question. It's wrong to consider that hash will be

Re: [sr-dev] [kamailio/kamailio] dispatcher : better distribution when using hash and destination is not available (#2363)

2020-06-27 Thread Kalki70
After careful consideration, I have decided not to implement a new algorithm. My proposal is an enhancement of current hash algorithms. It's an extension. Without changes it will behave like it has always been, since 2004. **It does not break anything**. However, if the user wants, via modpara

Re: [sr-dev] [kamailio/kamailio] dispatcher : better distribution when using hash and destination is not available (#2363)

2020-06-27 Thread Kalki70
@Kalki70 pushed 1 commit. 33bdabc77905b6b056022fa7eec560c0163f09ef Default mode is fully compatible with previous implementation. Default mode "Doesn nothing" -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/kamailio/kam

Re: [sr-dev] [kamailio/kamailio] dispatcher : better distribution when using hash and destination is not available (#2363)

2020-06-24 Thread Kalki70
I never said there was a bug. I don't think it is a bug. For me a bug is something wrong in the code, so the application does not behave as it is expected. In this case the code is right. It does what it is expected to do. Problem is, I think the expected behavior is a bad behavior. Maybe the or

Re: [sr-dev] [kamailio/kamailio] dispatcher : better distribution when using hash and destination is not available (#2363)

2020-06-24 Thread Kalki70
My fix does not break anything, as the re-hashing can be disabled by config. Backward compatibility is a must, always, in my opinion. I did a mistake though. Default value, if variable is not set, should be 0 ("disabled"). That would be something to modify. Maybe in August 2004 servers and reso

Re: [sr-dev] [kamailio/kamailio] dispatcher : better distribution when using hash and destination is not available (#2363)

2020-06-24 Thread Kalki70
My comments in between, with [Kalki70]: > First, the variables must be declared at the beginning of the > functions/blocks, to be coherent with the rest of the code. > [Kalki70] I did not know you had this convention. I am more used to the "declare the variable when you need it&qu

Re: [sr-dev] [kamailio/kamailio] Dispatcher : Re-distribution of messages when hash used and destination not available (#2361)

2020-06-17 Thread Kalki70
It seems that addresses are loaded in reverse order in dispatcher module. As it can be seen, when Dest4 is down, it's not Dest5 which receives all load. Its Dest3. In the code it's clear that id is incremented by one, not decremented. Only explanation I see is that order of addresses is loaded i

Re: [sr-dev] [kamailio/kamailio] dispatcher : better distribution when using hash and destination is not available (#2363)

2020-06-17 Thread Kalki70
When I realized the use of "use_default" flag I had trouble trying to fix the rehash in that case. According to documentation: [use_default](https://kamailio.org/docs/modules/4.3.x/modules/dispatcher.html#dispatcher.p.use_default) _3.10. use_default (int) If the parameter is set to 1, the last

Re: [sr-dev] [kamailio/kamailio] dispatcher : better distribution when using hash and destination is not available (#2363)

2020-06-17 Thread Kalki70
@Kalki70 pushed 1 commit. ce177c134f00cd1509313b50163849f736b6e0a9 dispatcher : FIX. Previous implementation of rehash did not consider case when "use_default" flag is active. -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.co

Re: [sr-dev] [kamailio/kamailio] dispatcher : better distribution when using hash and destination is not available (#2363)

2020-06-17 Thread Kalki70
@Kalki70 pushed 1 commit. fdd623a50fedd4312f8324cf8796ef00eed12af5 dispatcher: Fixs rehash of has when ds_rehash_max is 1. -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/kamailio/kamailio/pull/2363/files

[sr-dev] [kamailio/kamailio] dispatcher : better distribution when using hash and destination is not available (#2363)

2020-06-17 Thread Kalki70