[sr-dev] Is sort on htable init necessary?

Manfred Dellkrantz manfred.dellkrantz at verisure.com
Wed Feb 24 14:01:30 CET 2021


I've come across a problem with initializing the htable module based on data in MySQL. We persist a cache in MySQL during runtime and reload it on restart using the built in loading capabilities of htable. But occasionally when MySQL contains too many rows the query to MySQL times out. I've tracked it down to be due to the fact that the query wants the data to be sorted based on the column key_name (src/modules/htable/ht_db.c:236 on tag 5.4.4). Looking at the code this seems completely unnecessary and it seems to be working fine without the sorting (tested with mysql-rewriter). Any thoughts on this?

Best regards
Manfred


More information about the sr-dev mailing list