File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
ydb/core/fq/libs/control_plane_proxy/actors Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -202,9 +202,15 @@ class TCreateQueryRequestActor :
202202 }
203203 }
204204
205+ bool ShouldCreateRateLimiter () const {
206+ return RequestProxy->Get ()->Quotas
207+ && (RequestProxy->Get ()->Request .content ().type () == FederatedQuery::QueryContent::STREAMING
208+ || !Config.ComputeConfig .YdbComputeControlPlaneEnabled (RequestProxy->Get ()->Scope ));
209+ }
210+
205211 void OnBootstrap () override {
206212 this ->UnsafeBecome (&TCreateQueryRequestActor::StateFunc);
207- if (RequestProxy-> Get ()-> Quotas ) {
213+ if (ShouldCreateRateLimiter () ) {
208214 SendCreateRateLimiterResourceRequest ();
209215 } else {
210216 SendRequestIfCan ();
@@ -249,7 +255,7 @@ class TCreateQueryRequestActor :
249255 }
250256
251257 bool CanSendRequest () const override {
252- return (QuoterResourceCreated || !RequestProxy-> Get ()-> Quotas ) && TBaseRequestActor::CanSendRequest ();
258+ return (QuoterResourceCreated || !ShouldCreateRateLimiter () ) && TBaseRequestActor::CanSendRequest ();
253259 }
254260};
255261
You can’t perform that action at this time.
0 commit comments