TS-4929: No loading of HostDB disk file if sync_frequency=0#1076
Conversation
|
FreeBSD build successful! See https://ci.trafficserver.apache.org/job/Github-FreeBSD/928/ for details. |
|
Linux build successful! See https://ci.trafficserver.apache.org/job/Github-Linux/822/ for details. |
PSUdaemon
left a comment
There was a problem hiding this comment.
This looks good to me. BTW, adding a ?w=1 to the diff page makes it much simpler to review.
|
@zwoop (1) and (2) sound like they are in conflict? I'm confused about whether it loads or not? If it does load, do you really have a stale record problem, since each record has a TTL? |
|
Yes, they would have TTLs, but if I turned off syncing, I certainly wouldn't expect it to load something old. What if I had bad entries? What if I had a corruption of some sort? Since it will never update it, you are stuck with loading old (possibly stale or more likely expired) entries for the remaining of life? That just makes no sense. |
|
OK that sounds reasonable. |
* unique_ptr<char[]> -> array; default initialize .value * SnowflakeIDGenerator This encapsulates the state for snowflake id generation in a generator, avoiding global mutable state. --------- Co-authored-by: Brian Neradt <brian.neradt@gmail.com>
This has two benefit (2) is most important I think:
We avoid warnings on startup about not being able to load the HostDB.
Since in 7.0.0, turning off syncing (sync_frequency=0) completely disables writing to HostDB, it's now possible to end up loading a potentially stale HostDB from a previous upgrade.