On 09/08/2021 04:41 PM, Willy Tarreau wrote:
Hi Miroslav,

I just discovered that the changes I've made to the totally broken
variables API now broke opentracing because apparently it's using
some of the variable code's internals for its own use:

    https://github.com/haproxy/haproxy/runs/3545475810

That's annoying because unbreaking the API was already extremely
complicated due to the global name table limitation that became a
feature on its own, but now I see that some upper level code outside
of vars/ is also making intimate use of that broken API (e.g. in
flt_ot_vars_unset), and I have no idea what it tries to do nor why.

Most of the breakage comes from all the undocumented functions
flt_ot_vars_* but I don't even understand why this does not use
the vars_* API that Lua, CLI and SPOE already use. Note that it
doesn't seem that the breakage is large, so most likely we can
figure together a few changes to perform to fix it, but reversing
all that is quite a pain, and even if I went through the process
of trying to build it I wouldn't know if what I'm doing works or
not :-/

The changes that broke are in the following commit range which tries
hard to minimize the visible changes:

    10080716b..55f8a830d


Hello Willy,

there is a reason why i used some functions related to
reading/setting/searching variables. If I could use the original haproxy functions, I wouldn't write these because duplicating the
code doesn't make sense.

What I have seen so far is that the 'name' member of the vars structure
has actually been deleted and that the var_clear() function has been
given another parameter.

Generally, in the ot filter it is possible to transfer data via a group
of variables with a common prefix, so that in one place we set all the
variables and their values ​​and in another we read all the variables
with a given prefix.  The moment we write the variables we know their
names but at the moment we read them we don't know how many there are
and their complete name, rather we take all the variables of a
particular prefix.

I need to take a closer look at how ot filter source can be redesigned
to retain functionality and use the new structure definition to store
variables.

--
Zaga    <miros...@zagorac.name>

What can change the nature of a man?

Reply via email to