Skip to content

Read Solr results larger than a page in growing pages - #5127

Merged
porunov merged 1 commit into
JanusGraph:masterfrom
porunov:solr-reads-results-in-growing-pages
Oct 24, 2026
Merged

porunov merged 1 commit into
JanusGraph:masterfrom
porunov:solr-reads-results-in-growing-pages

Conversation

@porunov

@porunov porunov commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Fixes #5126

On Solr, JanusGraph read a result larger than a page (index.[X].max-result-set-size, 50 by default) in pages of that size, each at its offset: SolrResultIterator asked for each page after the first with start set to the number of hits before it. For each page, Solr collects and sorts every hit before its offset again, so a result read whole took time which grew with the square of its size. On Solr 9.10.1, g.V().has('name').order().by('name') read 31,846 hits in 5.9 s in pages of 50 and in 0.52 s in pages of 1,000, and its range(20000, 20010) took 2.9 s in pages of 50. Every read of a Solr result larger than a page paid it: has(key).order().by(key), an unordered has(key) read whole, a limit larger than a page, a direct index query without a limit.

And such a read waited forever where another transaction deleted some of its hits meanwhile, as where a traversal reads on while another one removes some of the elements it finds: SolrResultIterator read on until it had as many hits as its first page had found, and asked for a page only where the hits read so far filled whole pages, so a read which fell short of that number waited on its empty queue for the rest.

The first page of a result still holds max-result-set-size hits, or the limit if that is less, and every page after it now holds twice as many as the page before, up to the new option index.[X].solr.max-page-size (10,000 by default), but never more than the limit leaves: 50, 100, 200 and so on. A read still takes no more hits than its first page found, but now also ends with a page which comes back empty, or after which Solr found no more hits, as that page's count says. This removes a cost which the upcoming change #5125 would otherwise expose for plain order().by(key) traversals on Solr.

Changes

  • SolrIndex.MAX_PAGE_SIZE (new), index.[X].solr.max-page-size: the largest page, MASKABLE, positive, 10,000 by default, among the options of both modes. Its description says how the pages grow, what larger pages trade, why 10,000, and that a value no larger than max-result-set-size reads every result in pages of that size, as before.
  • SolrResultIterator reads the next page once the hits before have left its queue empty, at the offset of the hits read so far (the query's start plus them), asking for twice the rows of the page before, up to the largest page, but no more than what the limit and the count of the first page leave. A largest page no larger than the first page keeps every page at the first page's size.
    • A page is the last one where it comes back empty, whatever its count says, so that every read ends, or where its own count (numFound) is no larger than the offset after it. So a result which a page holds is one request, as before, and a result whose last page comes back full takes no further request.
    • A page which comes back short while its count says more remain isn't the last one: a distributed request leaves out a document which was deleted between its query phase and its get-fields phase, and takes it off the count (QueryComponent.regularFinishStage), and the read goes on from the offset of the hits read, as the deletion moved the hits after the deleted document one place forward.
    • A count which isn't exact, as where a request sets minExactCount, is a lower bound past the page, so it ends no read: Solr counts the hits exactly at least up to the end of the page.
    • The count of the first page still bounds the read, as on master: it takes no more hits than that count after the query's start, and its last page asks for no more, so that hits which other transactions add meanwhile, even one for every hit which the read takes, can't keep it going. A direct index query which sets minExactCount isn't bounded by it, as that count may then be a lower bound.
  • SolrIndex.query(IndexQuery …) and query(RawQuery …) pass max-page-size as the largest page, except for a direct index query with a rows parameter, which reaches Solr as it is: such a query passes its rows, and is read in pages of that size. No other parameter keeps the pages from growing: pages at offsets of any size go alike with the others, such as defType, re-ranking (rq) or timeAllowed. Two things change for direct index queries with parameters, as the iterator now sets the offset and the rows of every page: the later pages of one with a rows parameter ask for no more hits than its limit leaves (rows 100 with a limit of 150 reads pages of 100 and 50, where master asked for 100 twice), and a start which a parameter sets carries over to the later pages, which master read at the query's offset plus the pages before. The requests are otherwise those of master, with the same sort, or none.
  • SolrIndex.totals counts the hits from the start of the query, which a parameter may set, as its read returns them, rather than from its offset: with a start parameter of 24 on 40 documents, 16 rather than 40. Master returned 40 hits for that read as well, those from 24 and then those from 3 on.
  • index.[X].max-result-set-size says in its description that Solr reads the pages after the first larger, up to max-page-size. docs/configs/janusgraph-cfg.md has its row and the new option's as ConfigurationPrinter writes them.
  • Tests' configuration: the Solr test container and the Kerberos test read in pages of 3, as before, growing up to 12 (max-page-size): 3, 6, 12, 12 and so on, so that every Solr test which reads more than a page reads growing pages, and those which read 21 hits or more reach the largest, as the count of the first page trims the last page.
  • Docs: a section Search Requests on the Solr page: the pages, where a read ends, what the pages cost, the option, direct index queries and their totals, and what a read sees while the index changes. No page described the paging of Solr before.
  • Changelog: a section after Elasticsearch reads a limited result beyond 10,000 hits in larger pages.

Tests

  • SolrResultIteratorTest (new) reads from a mocked SolrClient, which answers each request with the ids of a list at its offset, as many as it asks for, with their count, and records the offset and the rows of each request. A test may change the list between pages, as other transactions change an index, and mark an id as lost between the phases of a request, which leaves it out of its page and of its count.
    • pagesDoubleUpToTheLargestPage: 100 ids in pages of 3 up to 10 are read at (offset, rows) (0,3) (3,6) (9,10) (19,10) … (89,10) (99,1), the last page asking for the one id which the first page's count leaves.
    • pagesStopAtTheLimit: from an offset of 5 with a limit of 20, (5,3) (8,6) (14,10) (24,1).
    • pagesKeepTheQueryRowsWhereTheLargestPageIsNoLarger: a largest page of 2, with pages of 3, reads (0,3) (3,3) (6,3) (9,1).
    • aReadEndsWithTheResultsWhichItsFirstPageFound: 3 ids take one request, 10 ids three, the last one (9,1), 9 ids two, and 3 ids from an offset of 17 of 20 one.
    • thePageAfterWhichSolrFoundNoMoreIsTheLast: from an offset of 5 of 20 ids, d18 and d19 are deleted after the first page, so that the third page, (14,6), comes back with 4 ids and a count of 18, which ends the read with d5 to d17 and no further request.
    • aPageWhichComesBackShortWhileMoreRemainIsNotTheLast: of 20 ids, d5 is lost between the phases of the second page, which comes back with 5 ids and a count of 19; the read goes on at (8,10) (18,2) and returns the other 19.
    • aPageWhichComesBackEmptyEndsTheRead: of 20 ids, the 6 of the second page are all lost between its phases, so that it comes back empty with a count of 14, which ends the read with the first 3 ids; asking for more once the read ended sends no request.
    • aPageLargerThanTheLimitReturnsTheLimit: a page of 10 rows under a limit of 5, as the rows of a parameter make it, returns 5 ids, in one request.
    • aReadWhichFindsFewerResultsThanItsFirstPageEnds: 2 of 10 ids, one read and one not, are deleted after the first page; the read, in pages of 3, ends within 10 s with 8 ids, having skipped d3, which the offsets moved past.
    • aReadWhichFindsResultsAddedMeanwhileEnds: one id is added at the end of 20 for every one which the read takes, so that every page comes back full and its count stays beyond its end; the read ends within 10 s with the 20 ids which its first page found, at (0,3) (3,6) (9,10) (19,1).
    • aCountWhichMayBeALowerBoundBoundsNoRead: with minExactCount, the mock counts exactly up to the end of each page and reports just past it beyond, the least which Solr may report, so that the first page finds 4 of 20 ids; the read isn't bounded by that count and takes all 20, at (0,3) (3,6) (9,10) (19,10).
  • SolrIndexTest.resultsLargerThanAPageAreReadInGrowingPages records the parameters of the searches which SolrJ sends, through a request interceptor of HttpClientUtil, for 40 documents, in pages of 3 up to 12 as the tests' configuration has them:
    • a graph query ordered by time is read at (0,3) (3,6) (9,12) (21,12) (33,7), the last page asking for the 7 documents which the first page's count leaves, sorted by time asc alone, and with a limit of 20 at (0,3) (3,6) (9,11); an unordered one in the same pages without a sort; a limit of 3 and a result of 3 documents are one request each;
    • a direct index query is read in the same pages without a sort, and from an offset of 2 at (2,3) (5,6) (11,12) (23,12) (35,5);
    • with a parameter of its own other than rows, defType, it is read in growing pages too, (0,3) (3,6) (9,1) for 10 documents; with rows 2 and a limit of 5 at (0,2) (2,2) (4,1); with rows 10 and a limit of 5 at (0,10), returning 5; with start 24 at (24,3) (27,6) (33,7), returning 16; and its totals take one request, and count 40, or 16 from that start.
  • IndexProviderTest.resultsOfSeveralPagesComeWholeInOneOrderWhateverTheirLimit (every index backend; pages of 3 on Elasticsearch and Solr, growing up to 12 on Solr). 20 documents with ties on time and on name, of which the second half is written first, in a transaction of its own.
    • Graph queries without an order, ascending and descending by time and by name, and by both: each returns every document once and in order, and with limits from 1 to 21 the start of its whole result.
    • Direct index queries of time:[0 TO *], without an order, ascending by time and descending by name, and of text:(alpha beta) by relevance, where the second half holds both words and the first half one: offsets from 0 to 21 with limits from 1 to 7 or none return the slice of the whole result, which totals counts; by relevance, the second half comes first.
  • IndexProviderTest.readsOfSeveralPagesEndWhileDocumentsAreDeletedOrAdded (every index backend): a read of 10 documents, ordered by time and unordered, during which another transaction deletes the first document read and another one, and adds two in the middle of the order to the ordered read, ends within 60 s with documents of the result alone. Elasticsearch reads all its pages in the state of the index at the first one, and Lucene every hit at once; Solr reads each page at its offset in the state of the moment, which may skip or repeat a document.

Mutations, each reverting or breaking one part of the change, run on Solr 9.10.1 in the JVM: 21 of 22 are caught, and the last one is equivalent.

Mutation Caught by
Pages which don't grow the request test, 14 requests for 5, and eight iterator tests
Pages which grow past the largest page the request test, (21,19) for (21,12) (33,7), and seven iterator tests
A last page which asks for more than the limit and the first page's count leave the request test, 12 rows for 7, and seven iterator tests, as pagesStopAtTheLimit: (24,10) for (24,1)
A page which comes back short ending the read, as in an earlier version aPageWhichComesBackShortWhileMoreRemainIsNotTheLast: 8 ids of 19
Only an empty page ending the read four iterator tests: one more request, which finds nothing
The count compared with the hits read, leaving out the query's start thePageAfterWhichSolrFoundNoMoreIsTheLast: one more request, (18,2), from an offset of 5
An empty page not ending the read by itself aPageWhichComesBackEmptyEndsTheRead: asking for more once the read ended reads on
Master's end: waiting for the hits which the first page found the deletion test times out after 60 s, and five iterator tests after 10 s
No bound by the count of the first page aReadWhichFindsResultsAddedMeanwhileEnds times out after 10 s; the request test, 12 rows for 7; five other iterator tests
The bound applied where the query sets minExactCount aCountWhichMayBeALowerBoundBoundsNoRead: 4 ids of 20
The bound counted from the start of the result rather than from the query's start the request test, 7 rows for 5 from an offset of 2, and thePageAfterWhichSolrFoundNoMoreIsTheLast, (14,10) for (14,6)
Pages at offsets which leave out the query's start the request test and the consistency test at an offset of 2; three iterator tests
A largest page below the first page's size shrinking the pages pagesKeepTheQueryRowsWhereTheLargestPageIsNoLarger: (3,2) (5,2) …
A page which asks for more than the limit returning all it brings aPageLargerThanTheLimitReturnsTheLimit and the request test: 10 for 5
Graph queries read in pages of one size the request test: 14 requests for 5
Direct index queries without a rows parameter read in pages of one size the request test: 14 requests for 5
Direct index queries with a rows parameter read in growing pages the request test: (2,3) for (2,2) (4,1) with rows 2
Direct index queries with any parameter read in pages of one size, as the version before this one the request test: (3,3) (6,3) (9,1) for (3,6) (9,1) with defType
Direct index queries with a rows parameter read in pages of max-result-set-size rather than their rows the request test: (2,3) for (2,2) (4,1) with rows 2
The option ignored, its default taken the request test: (21,19) for (21,12) (33,7)
totals counted from the query's offset rather than from the start which a parameter sets the request test: 40 for 16
Direct index queries with a rows parameter given a largest page of 0 rather than their rows equivalent: the iterator keeps the pages at the first page's size whatever the largest page below it, so both read alike

On master, with these tests:

  • readsOfSeveralPagesEndWhileDocumentsAreDeletedOrAdded fails on Solr in the JVM: the unordered read, which loses two documents and gains none, times out after 60 s. The ordered one, which gains as many as it loses, passes.
  • resultsLargerThanAPageAreReadInGrowingPages fails at its first check: pages of 3, (0,3) (3,3) ….
  • resultsOfSeveralPagesComeWholeInOneOrderWhateverTheirLimit passes, as master reads every page at its offset in the same order. SolrResultIteratorTest calls the iterator's new constructor.
  • The reproduction of the issue, run with each janusgraph-solr jar against Solr 9.10.1 in a container: with master's, it is still waiting after 30 s, having returned [n0, n1, n2, n4, n5, n6, n7, n8]; with this change, it returns [n0, n1, n2, n4, n5, n6, n7, n8, n9], n3 skipped by the offsets.

Locally, Java 11, on this change as it stands, with checkstyle (no violations):

  • On Solr 9.10.1 in the JVM, SolrRunner's MiniSolrCloud, with pages of 3 growing up to 12 as in the tests' configuration: JanusGraphIndexTest as BerkeleySolrTest configures it (138, 1 skipped), with the harness's collections.txt given the listPropertyOrdering collection, which the in-JVM harness lacks, and IndexProviderTest with SolrIndexTest's tests as SolrIndexWithoutKerberosTest configures them (268, 117 skipped) pass, and so do the tests of janusgraph-solr which need no container: SolrResultIteratorTest (11), SolrIndexQueryFilterTest (10), SolrIndexCreateCollectionRequestTest (5), GeoToWktConverterTest (6), SolrIndexDateFormatTest (1) and StandardTokenizerTest (1). The three new tests and singleStore of SolrIndexKerberosKeytabTest, which CI leaves out, pass under Kerberos (4).
  • On Solr 8.11.4 (-Psolr8) and on Solr 9.10.1 in a container, SolrIndexWithoutKerberosTest's three new tests, testScroll and singleStore (5 on each), and eight tests of BerkeleySolrTest which read results of several pages in order, testIndexing, testRawQueries, testRawQueriesWithParameters, testOrderingListProperty, testOrderByWithRange, testOrderLeavesOutTheElementsWithoutAKeyItOrdersBy, testMixedIndexOrdersElementsWithoutTheKeyLast and testStringsAreOrderedByCodePoint (8 on each), pass.
  • janusgraph-driver (132), janusgraph-core (245), janusgraph-inmemory (717, 85 skipped), janusgraph-test (1,132), janusgraph-berkeleyje (399, 12 skipped) and janusgraph-lucene (472, 148 skipped), whose code this change leaves as it was but for the description of max-result-set-size and the two new tests of IndexProviderTest, pass, and so do the two new tests, testScroll and singleStore of ElasticsearchIndexTest against Elasticsearch 9.5.4 in a container (4).
  • CQL and the other storage backends are left to CI, as are the whole Solr and Elasticsearch suites in their CI containers.

Notes

  • No cursor. An earlier version of this change read such results through a cursor (cursorMark), each page after the last hit of the page before, which would also have kept the pages exact while other transactions change the index. A/B timings of that version showed its costs: on an index of one shard, a cursor page still visits every match, about 1 ms a page against about 10 ms for an offset page of 50, so the number of pages remains the lever; it read unsorted results 27–48% and a limit of two pages 79% more slowly than master; and a cursor needs a sort which ends with the uniqueKey, which the example schema (version 1.5, string without docValues) makes Solr uninvert into the heap of every core, which can take a gigabyte or more per replica of a large collection. A cursor could follow where the key field has docValues, for exact reads under concurrent changes.

  • Why 10,000. It is Elasticsearch's largest page by default (index.max_result_window), and with it the 31,846 hits of the benchmark take 10 requests: 50, 100, …, 6,400, 10,000 and 9,096 hits, where master took 637 requests in pages of 50, and 32 in pages of 1,000, which read them in 0.52 s against 5.9 s. A larger value only saves pages on results of hundreds of thousands of hits, and costs responses of that size, which JanusGraph holds until they are read. Beyond 10,000, every page still costs Solr the hits before it: a million hits take about 100 such pages.

  • Where a read ends. The count of the first page bounds the read, as on master, so that hits which other transactions add meanwhile can't keep it going; it may leave out some of them, or repeat one, as offsets allow. Within that bound, the count of each page decides whether another page follows, and an empty page ends the read whatever its count says. A result which a page holds is one request, as before, and so is the last page of a result which ends exactly with it. A page may come back short while more hits remain, where a distributed request (more than one shard, or a node with no active replica of the shard) left out a document deleted between its phases, and the read goes on. Where every hit of a page was deleted between its phases, the page comes back empty and ends the read early: that rare case is the price of a read which always ends. A count which isn't exact, as where a request sets minExactCount, is a lower bound past the page, so it ends no read; SolrJ's streaming responses, which the read uses, don't report whether a count is exact anyway. As the first count of such a query may be a lower bound too, it bounds no read of a query which sets minExactCount, which graph queries never do: such a read ends by the counts of its pages alone.

  • Pages at offsets under concurrent changes: a hit which another transaction deletes or adds ahead of the hits read moves the hits after it, so a page may skip or repeat one, as before; readsOfSeveralPagesEndWhileDocumentsAreDeletedOrAdded checks only that the read ends with documents of the result. The order of ties, and of results without an order, is Solr's, as before.

  • The tests' configuration reads in pages of 3 growing up to 12 (max-page-size) in JanusGraphSolrContainer and SolrIndexKerberosKeytabTest: every Solr test which reads more than a page reads growing pages, and those which read 21 hits or more reach pages of 12.

  • index.[X].max-result-set-size's description in GraphDatabaseConfiguration changes, so janusgraph-cfg.md changes with it; ConfigurationPrinter, run through janusgraph-doc, writes both rows as they are here.

  • Cost. An A/B of janusgraph-solr, master's jar against this change's, both with master's janusgraph-core, on Solr 9.10.1 in a container with 31,846 vertices with a unique name in a mixed index, at pages of 50 and of 1,000, returns the same results with both jars. Each figure is the median of the medians of three passes a side, in alternating order, each in a JVM of its own on a freshly loaded graph, of three timed windows of 2 s after a warm-up, at 1 thread. They were measured on this change before its read was bounded by the count of its first page, which adds a comparison per page and asks the last page for no more rows than that count leaves, as 9,096 rather than 10,000 for the whole read of 31,846 hits; the same hits come back. A later run of this change as it stands, with the bound, took from 2.0% less to 4.6% more time than the table's figures for it on every traversal, as 0.23 s for the whole order and 0.15 s for range(20000, 20010) at pages of 50, where master's own figures varied more between the runs, as 6.7 s against 5.9 s for the whole order.

    Traversal pages of 50: master this change pages of 1,000: master this change
    g.V().has('name').order().by('name'), 31,846 vertices 5.9 s 0.22 s −96.2% 0.52 s 0.22 s −56.8%
    … .limit(31846), the same vertices 5.9 s 0.22 s −96.2% 0.51 s 0.22 s −56.1%
    … .range(20000, 20010) 2.9 s 0.14 s −95.0% 0.29 s 0.14 s −51.0%
    g.V().has('name'), read whole, unsorted 0.38 s 0.12 s −67.6% 0.15 s 0.12 s −21.6%
    g.V().has('age').order().by('age'), ages of 0 to 99 2.8 s 0.17 s −94.2% 0.30 s 0.16 s −46.5%
    … .order().by('name').filter(values('uid').is(lt(400))).limit(10), which stops early 0.44 s 0.17 s −60.2% 0.19 s 0.17 s −12.7%
    g.V().has('name').order().by('name').limit(10), one page 388 µs 377 µs −2.7% 388 µs 388 µs +0.2%
    … .limit(100), two pages of 50 827 µs 822 µs −0.7% 481 µs 474 µs −1.5%
    … .order().by('name').count() 373 µs 378 µs +1.3% 371 µs 366 µs −1.3%
    g.V().has('name').limit(10), unsorted 370 µs 377 µs +1.8% 373 µs 378 µs +1.4%
    g.V().has('age').order().by('age').limit(10) 389 µs 389 µs 0.0% 378 µs 382 µs +1.1%
    g.V().has('name', textPrefix('n000010')), a page or less without a limit 364 µs 360 µs −1.2% 360 µs 360 µs −0.1%

🤖 Generated with Claude Code

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unlimited reads can continue chasing sustained concurrent inserts without reaching exhaustion.

1 open issue
What changed in this PR

This PR addresses #5126 by growing Solr result pages to reduce repeated offset-query work and revising termination checks to prevent reads from waiting indefinitely after deletions. It also prepares Solr for the broader mixed-index ordering use in #5125.

Changes:

  • Adds configurable page growth while preserving query limits and explicit rows parameters.
  • Aligns direct-query pagination and totals with the effective start.
  • Adds regression coverage and documents paging behavior and concurrent-update limitations.
File Description
janusgraph-solr/​src/​test/​java/​org/​janusgraph/​diskstorage/​solr/​SolrResultIteratorTest.java Tests page growth, limits, and termination.
janusgraph-solr/​src/​test/​java/​org/​janusgraph/​diskstorage/​solr/​SolrIndexTest.java Checks outgoing page requests and direct-query totals.
janusgraph-solr/​src/​test/​java/​org/​janusgraph/​diskstorage/​solr/​SolrIndexKerberosKeytabTest.java Enables growing pages in Kerberos tests.
janusgraph-solr/​src/​test/​java/​org/​janusgraph/​diskstorage/​solr/​JanusGraphSolrContainer.java Configures small growing pages for container tests.
janusgraph-solr/​src/​main/​java/​org/​janusgraph/​diskstorage/​solr/​SolrResultIterator.java Implements growing pages and revised exhaustion checks.
janusgraph-solr/​src/​main/​java/​org/​janusgraph/​diskstorage/​solr/​SolrIndex.java Wires the page cap and effective query offset.
janusgraph-core/​src/​main/​java/​org/​janusgraph/​graphdb/​configuration/​GraphDatabaseConfiguration.java Updates the batch-size option description.
janusgraph-backend-testutils/​src/​main/​java/​org/​janusgraph/​diskstorage/​indexing/​IndexProviderTest.java Adds cross-backend pagination and concurrent-update tests.
docs/​index-backend/​solr.md Explains paging settings and consistency limitations.
docs/​configs/​janusgraph-cfg.md Documents the new option and revised batch behavior.
docs/​changelog.md Records pagination improvements and behavior changes.

Review effort: Balanced

Fixes JanusGraph#5126

SolrIndex read a result larger than a page (max-result-set-size) in
pages of that size at offsets. For each page, Solr collects and sorts
every hit before its offset again, so a result read whole took time
which grew with the square of its size: on Solr 9.10.1,
g.V().has('name').order().by('name') read 31,846 hits in 5.9 s in pages
of 50 and in 0.52 s in pages of 1,000. And SolrResultIterator read on
until it had as many hits as its first page had found, asking for a
page only where the hits read so far filled whole pages, so a read
which fell short of that number, as where another transaction deleted
some of its hits meanwhile, waited forever on its queue.

The first page of a result still holds max-result-set-size hits, or the
limit if that is less, so that a query which a page holds is one
request as before. Every page after it now holds twice as many hits as
the page before, up to the new option index.[X].solr.max-page-size,
10,000 by default, but never more than the limit leaves. The pages only
grow while the result is read on, so a read which stops early asks for
no more than twice the hits it takes, plus a first page. A value no
larger than max-result-set-size reads every result in pages of that
size, as before. A direct index query with a rows parameter, which
reaches Solr as it is, is read in pages of its rows, but its later
pages now ask for no more hits than its limit leaves. A start which a
parameter sets now carries over to the later pages, and totals count
the hits from it. The requests are otherwise those of master, with the
same sort.

A read still takes no more hits than its first page found after its
start, as on master, so that hits which other transactions add
meanwhile can't keep it going; its last page now asks for no more. And
it now also ends with a page which comes back empty, or after which
Solr found no more hits, as the count of that page says, where it
waited forever for the hits which the first page found. A page may come
back short while more hits remain: a distributed request leaves out a
document which was deleted between its phases, and takes it off its
count. A count which isn't exact, as where a request sets
minExactCount, is a lower bound past the page, so it ends no read; and
as the count of the first page may then be a lower bound too, it bounds
no read of a query which sets minExactCount.

Signed-off-by: Oleksandr Porunov <alexandr.porunov@gmail.com>
Co-authored-by: Oleksandr Porunov <alexandr.porunov@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@porunov
porunov force-pushed the solr-reads-results-in-growing-pages branch from 6705373 to d958f68 Compare October 24, 2026 03:35
@porunov
porunov requested a balanced review from Copilot October 24, 2026 03:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No unresolved issues were identified, and the regression coverage addresses page growth, query parameters, result bounds, and termination under concurrent changes.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@porunov
porunov marked this pull request as ready for review October 24, 2026 06:07
@porunov porunov added this to the 1.2.0 milestone Oct 24, 2026
@porunov
porunov merged commit b7c14c5 into JanusGraph:master Oct 24, 2026
253 of 309 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Solr reads large results at offsets, at a cost which grows with the square of their size, and waits forever after a deletion

2 participants