Background
#467 retired the stored query entity and its CRUD API because prepared queries were going to be redefined on Actionbase Query, and #466 said that redesign would be tracked separately. It never was, so I'm opening this to track it.
What I want is a query whose steps are fixed and whose values are not: a caller sends values alone, and whatever is derived from the body — a transform's compiled plan above all — is built once and reused. That only pays off if the registered body never changes between calls, so where the values go is most of the design.
Task
Done When
A query is registered once and called by a name with values alone, and the transform's plan is compiled on the first call rather than on each one. I can edit a registered query, or move a name onto a different one, without resending the parts that did not change.
Notes
Two things need deciding, and neither belongs in a PR review.
Storage costs two system labels — one for queries, one for the names. #467 narrowed the metastore surface and #347's production run is still pending, so I'd want the owner of #347 to agree before this lands.
A name resolves through a cache held for metastoreReloadInterval, so after I move a name, instances disagree for up to a minute. That's the same bargain the label registry makes. If repointing a name is meant to be an incident response, a minute is too long, and the alternative is the metadata sync already used for labels.
One thing to record while I'm here: ActionbaseQuery.stats is declared but the v3 execution path ignores it. I store it and echo it back so nothing is silently dropped, but it does nothing yet.
Background
#467 retired the stored query entity and its CRUD API because prepared queries were going to be redefined on Actionbase Query, and #466 said that redesign would be tracked separately. It never was, so I'm opening this to track it.
What I want is a query whose steps are fixed and whose values are not: a caller sends values alone, and whatever is derived from the body — a
transform's compiled plan above all — is built once and reused. That only pays off if the registered body never changes between calls, so where the values go is most of the design.Task
transformand{name}binding on Actionbase QueryPOST /graph/v3/query)Done When
A query is registered once and called by a name with values alone, and the transform's plan is compiled on the first call rather than on each one. I can edit a registered query, or move a name onto a different one, without resending the parts that did not change.
Notes
Two things need deciding, and neither belongs in a PR review.
Storage costs two system labels — one for queries, one for the names. #467 narrowed the metastore surface and #347's production run is still pending, so I'd want the owner of #347 to agree before this lands.
A name resolves through a cache held for
metastoreReloadInterval, so after I move a name, instances disagree for up to a minute. That's the same bargain the label registry makes. If repointing a name is meant to be an incident response, a minute is too long, and the alternative is the metadata sync already used for labels.One thing to record while I'm here:
ActionbaseQuery.statsis declared but the v3 execution path ignores it. I store it and echo it back so nothing is silently dropped, but it does nothing yet.