MCPcopy Create free account
hub / github.com/apache/trafficserver / load_spec

Method load_spec

plugins/experimental/txn_box/plugin/src/Extractor.cc:130–154  ·  view source on GitHub ↗

Update @a spec as needed to have the correct "this" extractor.

Source from the content-addressed store, hash-verified

128
129 /// Update @a spec as needed to have the correct "this" extractor.
130 Errata
131 load_spec(Extractor::Spec &spec)
132 {
133 if (spec._exf == &ex_this) {
134 auto &&[tinfo, errata] = _fg.load_key(_cfg, _tracking, spec._ext);
135 if (errata.is_ok()) {
136 spec._exf = &_fg._ex_this;
137 // Don't track if the target is a literal - no runtime extraction needed.
138 if (!tinfo->_expr.is_literal()) {
139 _dependent_p = true;
140 // If not already marked as a reference target mark it.
141 if (tinfo->_exf_idx == INVALID_IDX) {
142 tinfo->_exf_idx = _fg._ref_count++;
143 // This marking happens after the depth first dependency chain has been explored
144 // therefore all dependencies for this target are already in the @a _order_idx
145 // elements, and therefore it is time to add this one.
146 _tracking._info[tinfo->_exf_idx]._order_idx = tinfo - _tracking._info.data();
147 }
148 // Invariant - @a _dependent_p is true => @a _ref_count is non-zero.
149 }
150 }
151 return std::move(errata);
152 }
153 return {};
154 }
155
156 Errata
157 operator()(std::monostate)

Callers 1

operator()Method · 0.95

Calls 4

load_keyMethod · 0.80
is_okMethod · 0.45
is_literalMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected