masaori335 commented on pull request #6869: URL: https://github.com/apache/trafficserver/pull/6869#issuecomment-643844128
Adding `proxy.config.hostdb.io.max_buffer_index` for #6850 looks reasonable, but other changes I have questions. 1. `iobuffer_size_to_index()` vs `buffer_size_to_index()` I don't know why, but we have similar functions. IIUC, the difference is `iobuffer_size_to_index()` returns negative value if requested size is larger than `BUFFER_SIZE_FOR_INDEX(max)`. OTOH, `buffer_size_to_index()` returns `0` as `DEFAULT_BUFFER_BASE_SIZE` in such case. So we don't need to change `buffer_size_to_index()` calls if our target is `iobuffer_size_to_index()`. 2. If we this go this way, we should get rid of the default value of `iobuffer_size_to_index()` to make sure the caller sets the value explicitly. ``` - extern int64_t iobuffer_size_to_index(int64_t size, int64_t max = max_iobuffer_size); + extern int64_t iobuffer_size_to_index(int64_t size, int64_t max); ``` 3. Some `iobuffer_size_to_index()` calls has value from dedicated records.config, others has fixed value (`BUFFER_SIZE_INDEX_32K`). What's the policy of this difference? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
