You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When storing stats in shared memory for hot-restart, we preallocate max_stats * maxNameLength for string storage. But this means you have to make hard up-front decisions about how much memory you can spend. However if we disable hot-restart, there's no compelling reason to pad each stat, so you could just set maxNameLength pretty high. If that were fixed, we wouldn't have to tune maxNameLength so carefully.
@ambuc may wind up looking at this as he was the last one to dive into the not-hot-restart case.
The text was updated successfully, but these errors were encountered:
More thoughts on this in light of the #3506 which forced me to look at the stats code again and realize this problem:
I think a solution to this problem that will improve the maintainability of the codebase is to remove the following methods & data from Stats::RawStatsData
configure(options)
configureForTestsOnly(options)
maxNameLength()
maxObjNameLength()
nameSize()
static initializeAndGetMutableMaxObjNameLength()
and replace them all with:
static calculateRequiredSize(size_t name_length)
In the context of a hot-restart allocation, the calculateRequiredSize will be called with options_->maxObjNameLength(). In the case of a non-hot-restart allocation, it will be called with actual_name.size(). Then you can remove a whole bunch of hacks in the test dealing with the static underneath initializeAndGetMutableMaxObjNameLength.
Description:
@ambuc may wind up looking at this as he was the last one to dive into the not-hot-restart case.
The text was updated successfully, but these errors were encountered: