You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #59571, utilccl.CheckEnterpriseEnabled was called much more often in the read path, via kvfollowerreadsccl.canSendToFollower. However, CheckEnterpriseEnabled has a couple of performance issues:
We're instantiating a pgerror.Newf() in utilccl.check() when enterprise features are unavailable -- this is often necessary because we include cluster-specific info in the error message, but is expensive. However, in this specific case the caller just needs to know if there was an error, not the actual error message, so we should provide a variant using a generic, static error message.
We're decoding the license (if any) on each call, see:
Did we mean to label this as a GA-blocker? The performance of CheckEnterpriseEnabled did not regress in this release, did it? If not, then a fix for this will not qualify for a backport.
Did we mean to label this as a GA-blocker?The performance of CheckEnterpriseEnabled did not regress in this release, did it?
I initially thought much of this code was new, but then realized it was present in 20.2 and earlier -- forgot to update the labels, did so now. However, I'd imagine follower reads might get pretty expensive because of this.
If not, then a fix for this will not qualify for a backport.
In #59571,
utilccl.CheckEnterpriseEnabled
was called much more often in the read path, viakvfollowerreadsccl.canSendToFollower
. However,CheckEnterpriseEnabled
has a couple of performance issues:We're instantiating a
pgerror.Newf()
inutilccl.check()
when enterprise features are unavailable -- this is often necessary because we include cluster-specific info in the error message, but is expensive. However, in this specific case the caller just needs to know if there was an error, not the actual error message, so we should provide a variant using a generic, static error message.We're decoding the license (if any) on each call, see:
cockroach/pkg/ccl/utilccl/license_check.go
Lines 120 to 127 in c834bd8
The text was updated successfully, but these errors were encountered: