arunkumarucet opened a new pull request, #20430:
URL: https://github.com/apache/pinot/pull/20430

   `QueryLogger#logQueryReceived` logs the full SQL text at INFO and ignores 
`pinot.broker.query.log.length`. Only the completion line is truncated. A query 
carrying large literals, such as a 1536-dim vector passed to both 
`vectorSimilarity` and `cosineDistance` (~66 KB of SQL), writes that whole text 
to the broker log on every request.
   
   This applies the same `pinot.broker.query.log.length` limit to the received 
line.
   
   **Impact**
   
   Measured with VectorDBBench (OpenAI 50K x 1536, HNSW, 16 concurrent clients) 
on a single-node quickstart with 8 vCPUs:
   
   | Received line | Broker QPS |
   |---|---|
   | Full 66 KB query logged (today) | 354 |
   | Received line not logged (`logBeforeProcessing=false`) | 642 |
   
   With this change, setting `pinot.broker.query.log.length` is enough to get 
the second result without turning the received line off.
   
   **Note**
   
   `pinot.broker.query.log.length` defaults to `Integer.MAX_VALUE`, so a 
default install still logs the full query. I can follow up with a finite 
default if reviewers agree.
   
   **Testing**
   
   Added `QueryLoggerTest#shouldTruncateQueryReceivedToMaxQueryLength`, which 
fails without the fix. All 37 `QueryLoggerTest` tests pass.
   
   Labels: `bugfix`, `performance`
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to