Skip to content

[ES Visibility] Disallow partial results and always populate page token if results is not empty - #10540

Merged
rodrigozhou merged 1 commit into
mainfrom
rodrigozhou/es-partial-results
Jun 10, 2026
Merged

rodrigozhou merged 1 commit into
mainfrom
rodrigozhou/es-partial-results

Conversation

@rodrigozhou

@rodrigozhou rodrigozhou commented Jun 4, 2026 •

Copy link
Copy Markdown
Contributor

What changed?

  • Disable partial results from ES searches.
  • Populate page token whenever the page results is non-empty.

Why?

Prevent early termination when paginating over results: failed shards might produce partial results, which can produce page results to be smaller than the page size, and preventing the page token from being populated.

How did you test it?

  • built
  • run locally and tested manually
  • covered by existing tests
  • added new unit test(s)
  • added new functional test(s)

Potential risks

@rodrigozhou
rodrigozhou requested review from a team as code owners June 4, 2026 23:51
@rodrigozhou
rodrigozhou force-pushed the rodrigozhou/es-partial-results branch from 3261902 to 06e3496 Compare June 8, 2026 16:44
@rodrigozhou
rodrigozhou merged commit 5b4ab81 into main Jun 10, 2026
74 checks passed
@rodrigozhou
rodrigozhou deleted the rodrigozhou/es-partial-results branch June 10, 2026 01:09
@rodrigozhou rodrigozhou mentioned this pull request Jun 10, 2026
5 tasks
prathyushpv pushed a commit that referenced this pull request Jun 11, 2026
## What changed?
Fix visibility tests
Also refactored the tests to use `await.Require` instead of retrying
with sleep.

## Why?
PR #10540 caused several
tests to fail.

## How did you test it?
- [ ] built
- [ ] run locally and tested manually
- [ ] covered by existing tests
- [ ] added new unit test(s)
- [ ] added new functional test(s)

## Potential risks
jiechenz pushed a commit that referenced this pull request Jun 12, 2026
…en if results is not empty (#10540)

## What changed?
- Disable partial results from ES searches.
- Populate page token whenever the page results is non-empty.

## Why?
Prevent early termination when paginating over results: failed shards
might produce partial results, which can produce page results to be
smaller than the page size, and preventing the page token from being
populated.

## How did you test it?
- [x] built
- [ ] run locally and tested manually
- [x] covered by existing tests
- [ ] added new unit test(s)
- [ ] added new functional test(s)

## Potential risks
jiechenz pushed a commit that referenced this pull request Jun 12, 2026
## What changed?
Fix visibility tests
Also refactored the tests to use `await.Require` instead of retrying
with sleep.

## Why?
PR #10540 caused several
tests to fail.

## How did you test it?
- [ ] built
- [ ] run locally and tested manually
- [ ] covered by existing tests
- [ ] added new unit test(s)
- [ ] added new functional test(s)

## Potential risks
rodrigozhou added a commit that referenced this pull request Sep 1, 2026
…s less than page size (#11829)

## What changed?
Return empty page token when result size is less than page size in
Visibility with Elasticsearch.
This is a partial revert of
#10540.

## Why?
Since we disabled partial results in search queries, always returning
page token is unnecessary.

## How did you test it?
- [x] built
- [ ] run locally and tested manually
- [x] covered by existing tests
- [x] added new unit test(s)
- [ ] added new functional test(s)

## Potential risks
thestephenstanton pushed a commit that referenced this pull request Sep 2, 2026
…s less than page size (#11829)

## What changed?
Return empty page token when result size is less than page size in
Visibility with Elasticsearch.
This is a partial revert of
#10540.

## Why?
Since we disabled partial results in search queries, always returning
page token is unnecessary.

## How did you test it?
- [x] built
- [ ] run locally and tested manually
- [x] covered by existing tests
- [x] added new unit test(s)
- [ ] added new functional test(s)

## Potential risks
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.

2 participants