Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

document the search context is freed if the scroll is not extended #34739

Merged
merged 2 commits into from
Oct 25, 2018

Conversation

scampi
Copy link
Contributor

@scampi scampi commented Oct 23, 2018

The fetchPhaseShouldFreeContext returns true when there is a scroll context but the scroll parameter is null, thus freeing the search context.

return context.scrollContext().scroll == null;

@cbuescher cbuescher added >docs General docs changes :Search/Search Search-related issues that do not fall into other categories labels Oct 23, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search-aggs

Copy link
Member

@nik9000 nik9000 left a comment

Choose a reason for hiding this comment

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

Could you change the wording a little? I'm worried it won't be clear to someone who hasn't read the code.

@@ -109,7 +109,8 @@ request) tells Elasticsearch how long it should keep the search context alive.
Its value (e.g. `1m`, see <<time-units>>) does not need to be long enough to
process all data -- it just needs to be long enough to process the previous
batch of results. Each `scroll` request (with the `scroll` parameter) sets a
new expiry time.
new expiry time. If the `scroll` parameter is not passed, then the next
Copy link
Member

Choose a reason for hiding this comment

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

If a scroll request doesn't pass in scroll then we'll free the scroll context as part of that scroll request. The words you use makes it seem like the next scroll request would free the context.

Copy link
Member

@nik9000 nik9000 left a comment

Choose a reason for hiding this comment

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

LGTM. I'll stick this in my "to merge" queue and pick it up soon.

@nik9000 nik9000 merged commit 6edb893 into elastic:6.4 Oct 25, 2018
nik9000 pushed a commit that referenced this pull request Oct 25, 2018
nik9000 pushed a commit that referenced this pull request Oct 25, 2018
@nik9000
Copy link
Member

nik9000 commented Oct 25, 2018

Merged and forward ported to the 6.5, 6.x, and master branches. You should see the documentation update in a half hour or so.

@nik9000
Copy link
Member

nik9000 commented Oct 25, 2018

Thanks so much for making the doc clearer @scampi!

nik9000 pushed a commit that referenced this pull request Oct 25, 2018
@scampi scampi deleted the patch-2 branch October 25, 2018 20:59
jasontedor added a commit to jasontedor/elasticsearch that referenced this pull request Oct 26, 2018
* master: (74 commits)
  XContent: Check for bad parsers (elastic#34561)
  Docs: Align prose with snippet (elastic#34839)
  document the search context is freed if the scroll is not extended (elastic#34739)
  Test: Lookup node versions on rest test start (elastic#34657)
  SQL: Return error with ORDER BY on non-grouped. (elastic#34855)
  Reduce channels in AbstractSimpleTransportTestCase (elastic#34863)
  [DOCS] Updates Elasticsearch monitoring tasks (elastic#34339)
  Check self references in metric agg after last doc collection (elastic#33593) (elastic#34001)
  [Docs] Add `indices.query.bool.max_clause_count` setting (elastic#34779)
  Add 6.6.0 version to master (elastic#34847)
  Test: ensure char[] doesn't being with prefix (elastic#34816)
  Remove static import from HLRC doc snippet (elastic#34834)
  Logging: server: clean up logging (elastic#34593)
  Logging: tests: clean up logging (elastic#34606)
  SQL: Fix edge case: `<field> IN (null)` (elastic#34802)
  [Test] Mute FullClusterRestartIT.testShrink() until test is fixed
  SQL: Introduce ODBC mode, similar to JDBC (elastic#34825)
  SQL: handle X-Pack or X-Pack SQL not being available in a more graceful way (elastic#34736)
  [Docs] Add explanation for code snippets line width (elastic#34796)
  CCR: Rename follow-task parameters and stats (elastic#34836)
  ...
kcm pushed a commit that referenced this pull request Oct 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>docs General docs changes :Search/Search Search-related issues that do not fall into other categories v6.4.3 v6.5.0 v6.6.0 v7.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants