----- Original Message -----
> Updated Branches:
>   refs/heads/master 26e1417a9 -> 6cb58be3e
> 
> 
> TS-2292: the version of records.config increases unexpectly
> 
> 
> Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
> Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/6cb58be3
> Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/6cb58be3
> Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/6cb58be3
> 
> Branch: refs/heads/master
> Commit: 6cb58be3e7a5defab6d3419229d8d5e4b548e933
> Parents: 26e1417
> Author: Yu Qing <[email protected]>
> Authored: Tue Oct 29 14:11:02 2013 +0800
> Committer: Zhao Yongming <[email protected]>
> Committed: Thu Oct 31 18:51:41 2013 +0800
> 
> ----------------------------------------------------------------------
>  CHANGES                       |  3 ++
>  cop/TrafficCop.cc             |  4 +--
>  lib/records/I_RecCore.h       | 14 ++++-----
>  lib/records/P_RecCore.cc      | 52 ++++++++++++++++++++-------------
>  lib/records/P_RecCore.h       |  6 ++--
>  lib/records/P_RecDefs.h       |  1 +
>  lib/records/RecConfigParse.cc |  4 +--
>  lib/records/RecCore.cc        |  2 +-
>  lib/records/RecLocal.cc       | 25 ++++++++++++----
>  mgmt/AddConfigFilesHere.cc    |  2 +-
>  mgmt/BaseManager.h            |  1 +
>  mgmt/FileManager.cc           |  6 ++--
>  mgmt/FileManager.h            |  4 +--
>  mgmt/LocalManager.cc          | 15 +++++++---
>  mgmt/LocalManager.h           |  2 +-
>  mgmt/Main.cc                  |  4 +--
>  mgmt/Main.h                   |  2 +-
>  mgmt/ProcessManager.cc        |  1 +
>  mgmt/Rollback.cc              | 60 ++++++++++++++++++++------------------
>  mgmt/Rollback.h               |  7 +++--
>  mgmt/cluster/ClusterCom.cc    |  7 ++---
>  proxy/EventName.cc            |  1 +
>  22 files changed, 131 insertions(+), 92 deletions(-)
> ----------------------------------------------------------------------
> 
> 
> http://git-wip-us.apache.org/repos/asf/trafficserver/blob/6cb58be3/CHANGES
> ----------------------------------------------------------------------
> diff --git a/CHANGES b/CHANGES
> index f6aed0e..3aa3b75 100644
> --- a/CHANGES
> +++ b/CHANGES
> @@ -2,6 +2,9 @@
>  Changes with Apache Traffic Server 4.1.0
>  
>  
> +  *) [TS-2292] the version of records.config increases unexpectly.
> +   Author: Yu Qing
> +
>    *) [TS-2277] cluster alarm messages broadcast infinitely.
>     Author: Yu Qing
>  
> 
> http://git-wip-us.apache.org/repos/asf/trafficserver/blob/6cb58be3/cop/TrafficCop.cc
> ----------------------------------------------------------------------
> diff --git a/cop/TrafficCop.cc b/cop/TrafficCop.cc
> index a681704..7a258b8 100644
> --- a/cop/TrafficCop.cc
> +++ b/cop/TrafficCop.cc
> @@ -487,7 +487,7 @@ transient_error(int error, int wait_ms)
>  }
>  
>  static void
> -config_register_variable(RecT rec_type, RecDataT data_type, const char *
> name, const char * value)
> +config_register_variable(RecT rec_type, RecDataT data_type, const char *
> name, const char * value, bool /* inc_version */)
>  {
>    configTable.insert(std::make_pair(std::string(name), ConfigValue(rec_type,
>    data_type, value)));
>  }
> @@ -566,7 +566,7 @@ config_reload_records()
>  
>    configTable.clear();
>  
> -  if (RecConfigFileParse(config_file, config_register_variable) !=
> REC_ERR_OKAY) {
> +  if (RecConfigFileParse(config_file, config_register_variable, false) !=
> REC_ERR_OKAY) {
>      cop_log(COP_FATAL, "could not parse \"%s\"\n", config_file);
>      exit(1);
>    }
> 
> http://git-wip-us.apache.org/repos/asf/trafficserver/blob/6cb58be3/lib/records/I_RecCore.h
> ----------------------------------------------------------------------
> diff --git a/lib/records/I_RecCore.h b/lib/records/I_RecCore.h
> index 75fc359..dda8f44 100644
> --- a/lib/records/I_RecCore.h
> +++ b/lib/records/I_RecCore.h
> @@ -40,10 +40,10 @@ int RecSetDiags(Diags * diags);
>  //-------------------------------------------------------------------------
>  // Config File Parsing
>  //-------------------------------------------------------------------------
> -typedef void (*RecConfigEntryCallback)(RecT rec_type, RecDataT data_type,
> const char * name, const char * value);
> +typedef void (*RecConfigEntryCallback)(RecT rec_type, RecDataT data_type,
> const char * name, const char * value, bool inc_version);
>  
>  void RecConfigFileInit(void);
> -int RecConfigFileParse(const char * path, RecConfigEntryCallback handler);
> +int RecConfigFileParse(const char * path, RecConfigEntryCallback handler,
> bool inc_version);
>  
>  // Test whether the named configuration value is overridden by an
>  environment variable. Return either
>  // the overridden value, or the original value. Caller MUST NOT free the
>  result.
> @@ -105,11 +105,11 @@ int RecRegisterRawStatUpdateFunc(const char *name,
> RecRawStatBlock * rsb, int id
>  // already been taken out for the callback.
>  
>  // RecSetRecordConvert -> WebMgmtUtils.cc::varSetFromStr()
> -int RecSetRecordConvert(const char *name, const RecString rec_string, bool
> lock = true);
> -int RecSetRecordInt(const char *name, RecInt rec_int, bool lock = true);
> -int RecSetRecordFloat(const char *name, RecFloat rec_float, bool lock =
> true);
> -int RecSetRecordString(const char *name, const RecString rec_string, bool
> lock = true);
> -int RecSetRecordCounter(const char *name, RecCounter rec_counter, bool lock
> = true);
> +int RecSetRecordConvert(const char *name, const RecString rec_string, bool
> lock = true, bool inc_version = true);
> +int RecSetRecordInt(const char *name, RecInt rec_int, bool lock = true, bool
> inc_version = true);
> +int RecSetRecordFloat(const char *name, RecFloat rec_float, bool lock =
> true, bool inc_version = true);
> +int RecSetRecordString(const char *name, const RecString rec_string, bool
> lock = true, bool inc_version = true);
> +int RecSetRecordCounter(const char *name, RecCounter rec_counter, bool lock
> = true, bool inc_version = true);
>  
>  int RecGetRecordInt(const char *name, RecInt * rec_int, bool lock = true);
>  int RecGetRecordFloat(const char *name, RecFloat * rec_float, bool lock =
>  true);


I'm not a big fan of this change: Those functions already have a load of
parameters, and we're adding one more here without much explanation as to why.

Without such explanation it's also not understandable when it's set to
true why we do that in those specific instances but in others we set it to 
false.

++i
Igor Galić

Tel: +43 (0) 664 886 22 883
Mail: [email protected]
URL: http://brainsware.org/
GPG: 6880 4155 74BD FD7C B515  2EA5 4B1D 9E08 A097 C9AE

Reply via email to