-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Labels
Milestone
Description
See: #17783
I added to allow passing of contextual metering into the aggregator TX:
func (at *AggregatorRoTx) MeteredGetLatest(domain kv.Domain, k []byte, tx kv.Tx, maxStep kv.Step, metrics *changeset.DomainMetrics, start time.Time) (v []byte, step kv.Step, ok bool, err error)This would be more consistent with standard go metering practice if we passed this via a context.Context, but the TX API does not include a context. The above was implemented as tactical fix.
Not also we probably want to add tracing into oTX's for the same reason so we can trace the contribution to high level activities made by these lower level funtions. If we do this we should probably also pass the logger via the context, which is also standard go practice, rather than adding it as a function argument (this thoough is quite a major refactor).