• Oran Agra's avatar
    Additional config.c refactory and bugfixes · e0cc3c99
    Oran Agra authored
    - add capability for each config to have a callback to check if value is valid and return error string
      will enable converting many of the remaining custom configs into generic ones (reducing the x4 repetition for set,get,config,rewrite)
    - add capability for each config to  to run some update code after config is changed (only for CONFIG SET)
      will also enable converting many of the remaining custom configs into generic ones
    - add capability to move default values from server.h and server.c to config.c
      will reduce many excess lines in server.h and server.c (plus, no need to rebuild the entire code base when a default change 8-))
    
    other behavior changes:
    - fix bug in bool config get (always returning 'yes')
    - fix a bug in modifying jemalloc-bg-thread at runtime (didn't call set_jemalloc_bg_thread, due to bad merge conflict resolution (my fault))
    - side effect when a failed attempt to enable activedefrag at runtime, we now respond with -ERR and not with -DISABLED
    e0cc3c99
server.c 186 KB