Re: [PATCH] Support client connection annotation by helpers via clt_conn_id=ID

From: Alex Rousskov <rousskov_at_measurement-factory.com>
Date: Sat, 14 Jun 2014 10:58:22 -0600

On 06/11/2014 08:52 AM, Tsantilas Christos wrote:

> I must also note that this patch adds an inconsistency. All annotation
> key=values pairs received from helpers, accumulated to the existing key
> notes values. The clt_conn_id=Id pair is always unique and replaces the
> existing clt_conn_id=Id annotation pair.
> We may want to make all annotations unique, or maybe implement a
> configuration mechanism to define which annotations are overwriting
> their previous values and which appending the new values.

I suggest making all annotations unique (i.e., new values overwrite old
ones) because helpers that want to accumulate annotation values can do
that by returning old values along with new ones:

  received by helper: name=v1
  returned by helper: name=v1,v2

Please note that the opposite does not work: If annotation values are
always accumulated, a helper cannot overwrite/remove the old value.

If, in the future, we discover a need to support accumulating
annotations, we can add a squid.conf option to enumerate annotation keys
that should be accumulated.

IMO, if others agree that annotations should not automatically
accumulate, that change can be done as a part of this patch (because it
needs the uniqueness exception/code anyway). If others disagree, the
patch can go in "as is" while we wait for the need to add a
configuration option to control uniqueness.

Cheers,

Alex.
Received on Sat Jun 14 2014 - 16:58:37 MDT

This archive was generated by hypermail 2.2.0 : Sun Jun 15 2014 - 12:00:12 MDT