You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "nick-boss-tech (via GitHub)" <gi...@apache.org> on 2026/09/27 02:49:54 UTC
[PR] SOLR-8291, SOLR-13217: Skip null per-leaf export bitsets [solr]
nick-boss-tech opened a new pull request, #4953:
URL: https://github.com/apache/solr/pull/4953
## Summary
ExportWriter.SegmentIterator.topDocs() can receive a null per-leaf bitset when a collector never visits that leaf. This change treats that leaf as empty while preserving the iterator's leaf-ordinal alignment, avoiding the BitSetIterator NPE.
This covers the useFilterForSortedQuery=true /export path from SOLR-8291 and the collapse + /export path from SOLR-13217. The general searcher/collector path is unchanged.
## Tests
- :solr:core:test --tests org.apache.solr.handler.export.TestExportWriterUseFilterForSortedQuery --tests org.apache.solr.handler.export.TestExportWriter.testCollapseWithTrailingEmptyLeaf — passed
- Fixed-seed TestExportWriter.testRandomNumerics for SOLR-17392 — passed
- :solr:core:spotlessJavaCheck — passed
AI assistance was used in preparing this contribution; the patch and description were reviewed by the contributor.
--
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@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-8291, SOLR-13217: Skip null per-leaf export bitsets [solr]
Posted by "sigram (via GitHub)" <gi...@apache.org>.
sigram merged PR #4953:
URL: https://github.com/apache/solr/pull/4953
--
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@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-8291, SOLR-13217: Skip null per-leaf export bitsets [solr]
Posted by "sigram (via GitHub)" <gi...@apache.org>.
sigram commented on code in PR #4953:
URL: https://github.com/apache/solr/pull/4953#discussion_r4127197146
##########
solr/core/src/test/org/apache/solr/handler/export/TestExportWriterUseFilterForSortedQuery.java:
##########
@@ -0,0 +1,83 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.solr.handler.export;
+
+import org.apache.solr.SolrTestCaseJ4;
+import org.apache.solr.common.util.Utils;
+import org.apache.solr.index.LogDocMergePolicyFactory;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * SOLR-8291: {@code useFilterForSortedQuery=true} sends {@code /export} through {@code sortDocSet},
+ * which never calls {@code ExportCollector.getLeafCollector} for trailing unmatched leaves. The
+ * writer must treat those null bitsets as empty leaves instead of constructing a {@code
+ * BitSetIterator}.
+ */
+public class TestExportWriterUseFilterForSortedQuery extends SolrTestCaseJ4 {
Review Comment:
Nowadays `SolrTestCaseJ4` is frowned upon ;) can you use `SolrTestCase` instead?
--
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@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-8291, SOLR-13217: Skip null per-leaf export bitsets [solr]
Posted by "sigram (via GitHub)" <gi...@apache.org>.
sigram commented on PR #4953:
URL: https://github.com/apache/solr/pull/4953#issuecomment-5918740944
Thank you Nick for your contribution and patience :)
--
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@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-8291, SOLR-13217: Skip null per-leaf export bitsets [solr]
Posted by "nick-boss-tech (via GitHub)" <gi...@apache.org>.
nick-boss-tech commented on code in PR #4953:
URL: https://github.com/apache/solr/pull/4953#discussion_r4129770122
##########
solr/core/src/test/org/apache/solr/handler/export/TestExportWriterUseFilterForSortedQuery.java:
##########
@@ -0,0 +1,83 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.solr.handler.export;
+
+import org.apache.solr.SolrTestCaseJ4;
+import org.apache.solr.common.util.Utils;
+import org.apache.solr.index.LogDocMergePolicyFactory;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * SOLR-8291: {@code useFilterForSortedQuery=true} sends {@code /export} through {@code sortDocSet},
+ * which never calls {@code ExportCollector.getLeafCollector} for trailing unmatched leaves. The
+ * writer must treat those null bitsets as empty leaves instead of constructing a {@code
+ * BitSetIterator}.
+ */
+public class TestExportWriterUseFilterForSortedQuery extends SolrTestCaseJ4 {
Review Comment:
That is good to know; I have rebuilt the test accordingly. The focused tests and Spotless check pass.
--
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@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org