You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "prudhvigodithi (via GitHub)" <gi...@apache.org> on 2026/01/24 23:48:21 UTC

[PR] `TopFieldCollectorManager`: Support thread safe [lucene]

prudhvigodithi opened a new pull request, #15608:
URL: https://github.com/apache/lucene/pull/15608

   ### Description
   
   `TopFieldCollectorManager`: Support thread safe, resolves https://github.com/apache/lucene/issues/15605.
   


-- 
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: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] Remove `getCollectors()` from `TopFieldCollectorManager` [lucene]

Posted by "prudhvigodithi (via GitHub)" <gi...@apache.org>.
prudhvigodithi commented on code in PR #15608:
URL: https://github.com/apache/lucene/pull/15608#discussion_r3196441305


##########
lucene/CHANGES.txt:
##########
@@ -7,6 +7,9 @@ http://s.apache.org/luceneversions
 
 API Changes
 ---------------------
+* GITHUB#15605: Remove unused getCollectors() and internal collector tracking from
+  TopFieldCollectorManager. Clarify thread-safety documentation. (Prudhvi Godithi)

Review Comment:
   Missed it, updated in my latest commit Luca.



-- 
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: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] Remove `getCollectors()` from `TopFieldCollectorManager` [lucene]

Posted by "javanna (via GitHub)" <gi...@apache.org>.
javanna commented on PR #15608:
URL: https://github.com/apache/lucene/pull/15608#issuecomment-4396664697

   Merged,thank you! Ping me on the deprecation PR against 10x and I can help getting that one in. 


-- 
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: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] `TopFieldCollectorManager`: Support thread safe [lucene]

Posted by "prudhvigodithi (via GitHub)" <gi...@apache.org>.
prudhvigodithi commented on code in PR #15608:
URL: https://github.com/apache/lucene/pull/15608#discussion_r2838395552


##########
lucene/core/src/test/org/apache/lucene/search/TestTopFieldCollector.java:
##########
@@ -703,6 +710,43 @@ public void testRandomMinCompetitiveScore() throws Exception {
     dir.close();
   }
 
+  /**
+   * Test that concurrent newCollector() calls are thread-safe. See <a
+   * href="https://github.com/apache/lucene/issues/15605">GitHub issue #15605</a>
+   */
+  @SuppressWarnings("deprecation")

Review Comment:
   I was able to repro the issue with this test, this test fails when used `this.collectors = new ArrayList<>();`



-- 
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: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] Remove `getCollectors()` from `TopFieldCollectorManager` [lucene]

Posted by "javanna (via GitHub)" <gi...@apache.org>.
javanna commented on code in PR #15608:
URL: https://github.com/apache/lucene/pull/15608#discussion_r3193948499


##########
lucene/CHANGES.txt:
##########
@@ -7,6 +7,9 @@ http://s.apache.org/luceneversions
 
 API Changes
 ---------------------
+* GITHUB#15605: Remove unused getCollectors() and internal collector tracking from
+  TopFieldCollectorManager. Clarify thread-safety documentation. (Prudhvi Godithi)

Review Comment:
   can you move this to the end of the list? We normally append new changes to existing sections. Thanks!



-- 
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: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] Remove `getCollectors()` from `TopFieldCollectorManager` [lucene]

Posted by "javanna (via GitHub)" <gi...@apache.org>.
javanna merged PR #15608:
URL: https://github.com/apache/lucene/pull/15608


-- 
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: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] `TopFieldCollectorManager`: Support thread safe [lucene]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #15608:
URL: https://github.com/apache/lucene/pull/15608#issuecomment-4146151544

   This PR has not had activity in the past 2 weeks, labeling it as stale. If the PR is waiting for review, notify the dev@lucene.apache.org list. Thank you for your contribution!


-- 
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: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] `TopFieldCollectorManager`: Support thread safe [lucene]

Posted by "prudhvigodithi (via GitHub)" <gi...@apache.org>.
prudhvigodithi commented on PR #15608:
URL: https://github.com/apache/lucene/pull/15608#issuecomment-4382156237

   Thanks for the feedback Luca!. I've updated the PR to remove `getCollectors()` and the internal collectors list entirely and clarify the javadoc to document where thread-safety is guaranteed. Please check.


-- 
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: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] `TopFieldCollectorManager`: Support thread safe [lucene]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #15608:
URL: https://github.com/apache/lucene/pull/15608#issuecomment-4051343244

   This PR has not had activity in the past 2 weeks, labeling it as stale. If the PR is waiting for review, notify the dev@lucene.apache.org list. Thank you for your contribution!


-- 
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: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] Remove `getCollectors()` from `TopFieldCollectorManager` [lucene]

Posted by "prudhvigodithi (via GitHub)" <gi...@apache.org>.
prudhvigodithi commented on PR #15608:
URL: https://github.com/apache/lucene/pull/15608#issuecomment-4390598320

   > Small comment on the changes entry, looks good otherwise. This will need a deprecation PR for the 10x branch
   
   Thank you, true once merged I will create a follow up deprecation PR to https://github.com/apache/lucene/tree/branch_10x.


-- 
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: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] `TopFieldCollectorManager`: Support thread safe [lucene]

Posted by "javanna (via GitHub)" <gi...@apache.org>.
javanna commented on PR #15608:
URL: https://github.com/apache/lucene/pull/15608#issuecomment-4358838146

   hi @prudhvigodithi thanks opening this PR. 
   
   I commented on the issue that this PR addresses (see https://github.com/apache/lucene/issues/15605#issuecomment-4358830104).
   
   In short I am not sure that this PR fixes a real bug, and I believe supporting concurrency in `newCollector` would be controversial unless we confirm that it's a supported usecase. I would vote for instead deprecating and removing the unused `getCollectors` method and perhaps better document where thread safety is guaranteed.


-- 
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: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org