NSAmelchev opened a new pull request, #13862:
URL: https://github.com/apache/ignite/pull/13862

   ### Problem
   
   `ColocationGroup.filterByPartitions` builds the filtered assignments by 
checking every partition of the table
   against the filter, and `ColocationGroup.partitions` then scans the whole 
list to find the partitions of the node.
   A query by a primary key needs one partition, but does both passes over all 
partitions on every execution.
   
   ### Fix
   
   The filtered group remembers the partitions it was filtered by:
   - `filterByPartitions` fills the assignments for these partitions only;
   - `partitions` checks only these partitions.
   
   A group received from another node has no filter and is processed as before. 
The message format is not changed.
   
   ### Benchmark
   
   JMH, one embedded server node, 1024 partitions, table `KV (ID INT PRIMARY 
KEY, VAL VARCHAR)` with 100,000 rows,
   1 thread, ARM (Apple Silicon), OpenJDK 17.
   
   | Query                                | master, ops/s | PR, ops/s | Diff  |
   |--------------------------------------|---------------|-----------|-------|
   | `SELECT VAL FROM KV WHERE ID = ?`    | 35,594        | 44,932    | +26 % |
   | `UPDATE KV SET VAL = ? WHERE ID = ?` | 27,444        | 31,546    | +15 % |
   


-- 
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]

Reply via email to