mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 18:38:55 +00:00
Add flag to disable sql auto pipelining (#21067)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -934,6 +934,11 @@ pub fn hasQueryRunning(this: *PostgresSQLConnection) bool {
|
||||
}
|
||||
|
||||
pub fn canPipeline(this: *PostgresSQLConnection) bool {
|
||||
if (bun.getRuntimeFeatureFlag(.BUN_FEATURE_FLAG_DISABLE_SQL_AUTO_PIPELINING)) {
|
||||
@branchHint(.unlikely);
|
||||
return false;
|
||||
}
|
||||
|
||||
return this.nonpipelinable_requests == 0 and // need to wait for non pipelinable requests to finish
|
||||
!this.flags.use_unnamed_prepared_statements and // unnamed statements are not pipelinable
|
||||
!this.flags.waiting_to_prepare and // cannot pipeline when waiting prepare
|
||||
|
||||
Reference in New Issue
Block a user