xiangfu0 commented on code in PR #19894:
URL: https://github.com/apache/pinot/pull/19894#discussion_r4288762507


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/store/VectorIndexUtils.java:
##########
@@ -325,6 +326,8 @@ public static VectorSimilarityFunction toSimilarityFunction(
 
   public static IndexWriterConfig getIndexWriterConfig(VectorIndexConfig 
vectorIndexConfig) {
     IndexWriterConfig indexWriterConfig = new IndexWriterConfig();
+    // Lucene 10 disables this by default; retain the previous merge I/O 
throttling behavior.
+    ((ConcurrentMergeScheduler) 
indexWriterConfig.getMergeScheduler()).enableAutoIOThrottle();

Review Comment:
   Minor: here you cast the default merge scheduler 
(`(ConcurrentMergeScheduler) indexWriterConfig.getMergeScheduler()`), while the 
two text-index creators instead build a fresh `ConcurrentMergeScheduler` and 
call `setMergeScheduler`. The cast is safe today since `IndexWriterConfig` 
defaults to a `ConcurrentMergeScheduler`, but it would throw 
`ClassCastException` if that default ever changes. Consider matching the 
explicit-construction style used in the creators for consistency and robustness.



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