← Back to team overview

maria-developers team mailing list archive

Re: MTR related community contribution

 



On 2/6/2016 1:02 PM, Vicențiu Ciorbaru wrote:
Hi Vlad,

I'm looking at the community pull request https://github.com/grooverdan/mariadb-server/commit/a9dfee63bad7393002621f92c15f1debd535ee1a

I have a question regarding your commit: 2943d2b7e99b4221ef481890fc9a56ad569f3985

The contribution aims to remove the hard limit of 50 unique ids as it seems to cause problems for some use cases with a lot of proceeses. It does this by either leaving it at 50 or to be equal to the number of spawned processes.

I'm thinking that even setting the limit of unique ids to num_processes might cause problems if there is another mtr running in parallel and both have > 50 processes. This is probably minor but why set this limit so low? Wouldn't a larger number (say 10k) be ok? Or why not generate a random number and lock a file with that number? (if the random number is invalid, generate a new one. On average it should finish quite quickly)
Hi Vicentiu,
The 50 ports range limit was there before my patch, I just moved the start of the the range up from 250 to 300, so that the old mtr and "new"(i.e new in 2008) mtr have non-overlapping port range- because these 2 mtrs have different conflicting ideas of when a port is free.

10K or so limit should be fine. The reason why the limit is so small is unknown to me. Perhaps back in the day 50 mysqlds on the same machine were considered ought to be enough for anybody:)

I'm not sure randomization needs implementing, unless a measurement would show that it takes noticeable amount of time during startup. Randomization could be a minor annoyance to some people if they are used to have particular port numbers when mysqld is started via mtr, so if it does not bring much , maybe better not to do it.



Follow ups

References