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

Adding support for allow_partial_search_results in PIT #111516

Merged

Conversation

pmpailis
Copy link
Contributor

@pmpailis pmpailis commented Aug 1, 2024

This PR adds support for the allow_partial_search_results parameter for PIT requests, which enables creating a PIT even when some shards are unavailable.

This is related also to #110482, as we are generating a new PIT for compound retrievers, and we want to be able to support searches even when some shards are unavailable, i.e. to respect the request-based allow_partial_search_results.

Copy link
Contributor

github-actions bot commented Aug 1, 2024

Documentation preview:

@pmpailis
Copy link
Contributor Author

pmpailis commented Aug 1, 2024

@elasticmachine update branch

@pmpailis pmpailis requested a review from dnhatn August 2, 2024 10:12
@pmpailis pmpailis added :Search Foundations/Search Catch all for Search Foundations >enhancement labels Aug 2, 2024
@pmpailis pmpailis removed the request for review from dnhatn August 2, 2024 10:13
@pmpailis pmpailis marked this pull request as ready for review August 2, 2024 10:13
@elasticsearchmachine elasticsearchmachine added the Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch label Aug 2, 2024
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-search-foundations (Team:Search Foundations)

@elasticsearchmachine
Copy link
Collaborator

Hi @pmpailis, I've created a changelog YAML for you.

Copy link
Contributor

@jimczi jimczi left a comment

Choose a reason for hiding this comment

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

I question whether the parameter is necessary. It appears redundant with the search request parameter and might be misleading because errors aren't reported in later search requests, even if allow_partial_search_results is set to false.

An alternative is to always open the pit (even if shards are missing) and encode the missing shards in the pit id. This way, we can fail the missing shards during the search request and let allow_partial_search_results handle them?

@pmpailis
Copy link
Contributor Author

pmpailis commented Aug 5, 2024

I question whether the parameter is necessary. It appears redundant with the search request parameter and might be misleading because errors aren't reported in later search requests, even if allow_partial_search_results is set to false.

An alternative is to always open the pit (even if shards are missing) and encode the missing shards in the pit id. This way, we can fail the missing shards during the search request and let allow_partial_search_results handle them?

I see your point, but isn't this a significant change in the existing API behavior? Currently users know (or maybe at least partially expect) that if the index is not fully available, then PIT will also not be available. If we tolerate shard failures silently, with the default true for allow_partial_search_results, couldn't this potentially lead to some "weird" results for the users?

@jimczi
Copy link
Contributor

jimczi commented Aug 5, 2024

If we tolerate shard failures silently, with the default true for allow_partial_search_results, couldn't this potentially lead to some "weird" results for the users?

Shard failures are not silent, they are reported in the search response. Although I think you're right that it would be a breaking change. Maybe we can start by adding the parameter but only for the retriever case (not exposing it in the rest layer of the open pit command)? We should still encode the missing shards in the PIT though so that they can be reported in the search response when retrievers are used.

@pmpailis
Copy link
Contributor Author

pmpailis commented Aug 5, 2024

By "silent" I meant that that if enabling allow_partial_search_results by default, then the users would have to be aware of the new _shards section and properly account for the failed scenario, otherwise (including serverless) this wouldn't be noticeable for them. Also, another thing worth considering is that this has been discussed before as part of enhancing PIT in #96775 and support cases.

+1 on encoding the failures as well in PIT response; will update and add tests accordingly!

@pmpailis pmpailis merged commit 785fe53 into elastic:main Aug 26, 2024
15 checks passed
cbuescher pushed a commit to cbuescher/elasticsearch that referenced this pull request Sep 4, 2024
@javanna javanna added the v9.0.0 label Nov 11, 2024
@javanna
Copy link
Member

javanna commented Nov 11, 2024

This fix addresses #103165 .

SiddharthMantri added a commit to elastic/kibana that referenced this pull request Nov 21, 2024
…or PIT query (#200912)

Closes #200008

## Summary
This PR updates the session cleanup task to allow partial results in the
point in time query used to delete any invalid sessions.


### Notes
Using a [recently introduced option by
ES](elastic/elasticsearch#111516), the session
cleanup now allows the PIT to run over partial results. This should
reduce the noise we see around session_cleanup errors in our logs.


### Release notes
Fixes error with opening point in time query for session deletion by now
accounting for partial results.

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.


- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_node:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Nov 21, 2024
…or PIT query (elastic#200912)

Closes elastic#200008

## Summary
This PR updates the session cleanup task to allow partial results in the
point in time query used to delete any invalid sessions.

### Notes
Using a [recently introduced option by
ES](elastic/elasticsearch#111516), the session
cleanup now allows the PIT to run over partial results. This should
reduce the noise we see around session_cleanup errors in our logs.

### Release notes
Fixes error with opening point in time query for session deletion by now
accounting for partial results.

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_node:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

(cherry picked from commit 8f12714)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Nov 21, 2024
…or PIT query (elastic#200912)

Closes elastic#200008

## Summary
This PR updates the session cleanup task to allow partial results in the
point in time query used to delete any invalid sessions.

### Notes
Using a [recently introduced option by
ES](elastic/elasticsearch#111516), the session
cleanup now allows the PIT to run over partial results. This should
reduce the noise we see around session_cleanup errors in our logs.

### Release notes
Fixes error with opening point in time query for session deletion by now
accounting for partial results.

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_node:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

(cherry picked from commit 8f12714)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Nov 21, 2024
…or PIT query (elastic#200912)

Closes elastic#200008

## Summary
This PR updates the session cleanup task to allow partial results in the
point in time query used to delete any invalid sessions.

### Notes
Using a [recently introduced option by
ES](elastic/elasticsearch#111516), the session
cleanup now allows the PIT to run over partial results. This should
reduce the noise we see around session_cleanup errors in our logs.

### Release notes
Fixes error with opening point in time query for session deletion by now
accounting for partial results.

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_node:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

(cherry picked from commit 8f12714)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Nov 21, 2024
…or PIT query (elastic#200912)

Closes elastic#200008

## Summary
This PR updates the session cleanup task to allow partial results in the
point in time query used to delete any invalid sessions.

### Notes
Using a [recently introduced option by
ES](elastic/elasticsearch#111516), the session
cleanup now allows the PIT to run over partial results. This should
reduce the noise we see around session_cleanup errors in our logs.

### Release notes
Fixes error with opening point in time query for session deletion by now
accounting for partial results.

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_node:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

(cherry picked from commit 8f12714)
kibanamachine added a commit to elastic/kibana that referenced this pull request Nov 21, 2024
…sults for PIT query (#200912) (#201200)

# Backport

This will backport the following commits from `main` to `8.15`:
- [[Session management] update cleanup to allow partial search results
for PIT query (#200912)](#200912)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT
[{"author":{"name":"Sid","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-21T14:14:54Z","message":"[Session
management] update cleanup to allow partial search results for PIT query
(#200912)\n\nCloses
https://github.com/elastic/kibana/issues/200008\r\n\r\n##
Summary\r\nThis PR updates the session cleanup task to allow partial
results in the\r\npoint in time query used to delete any invalid
sessions.\r\n\r\n\r\n### Notes\r\nUsing a [recently introduced option
by\r\nES](elastic/elasticsearch#111516), the
session\r\ncleanup now allows the PIT to run over partial results. This
should\r\nreduce the noise we see around session_cleanup errors in our
logs.\r\n\r\n\r\n### Release notes\r\nFixes error with opening point in
time query for session deletion by now\r\naccounting for partial
results.\r\n\r\n### Checklist\r\n\r\nCheck the PR satisfies following
conditions. \r\n\r\nReviewers should verify this PR satisfies this list
as well.\r\n\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [x] The PR
description includes the appropriate Release Notes section,\r\nand the
correct `release_node:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"8f12714219ca4b4c8e58678d42e9978c3defa40b","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","Team:Security","v9.0.0","Feature:Security/Session
Management","backport:prev-major"],"title":"[Session management] update
cleanup to allow partial search results for PIT
query","number":200912,"url":"https://github.com/elastic/kibana/pull/200912","mergeCommit":{"message":"[Session
management] update cleanup to allow partial search results for PIT query
(#200912)\n\nCloses
https://github.com/elastic/kibana/issues/200008\r\n\r\n##
Summary\r\nThis PR updates the session cleanup task to allow partial
results in the\r\npoint in time query used to delete any invalid
sessions.\r\n\r\n\r\n### Notes\r\nUsing a [recently introduced option
by\r\nES](elastic/elasticsearch#111516), the
session\r\ncleanup now allows the PIT to run over partial results. This
should\r\nreduce the noise we see around session_cleanup errors in our
logs.\r\n\r\n\r\n### Release notes\r\nFixes error with opening point in
time query for session deletion by now\r\naccounting for partial
results.\r\n\r\n### Checklist\r\n\r\nCheck the PR satisfies following
conditions. \r\n\r\nReviewers should verify this PR satisfies this list
as well.\r\n\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [x] The PR
description includes the appropriate Release Notes section,\r\nand the
correct `release_node:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"8f12714219ca4b4c8e58678d42e9978c3defa40b"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/200912","number":200912,"mergeCommit":{"message":"[Session
management] update cleanup to allow partial search results for PIT query
(#200912)\n\nCloses
https://github.com/elastic/kibana/issues/200008\r\n\r\n##
Summary\r\nThis PR updates the session cleanup task to allow partial
results in the\r\npoint in time query used to delete any invalid
sessions.\r\n\r\n\r\n### Notes\r\nUsing a [recently introduced option
by\r\nES](elastic/elasticsearch#111516), the
session\r\ncleanup now allows the PIT to run over partial results. This
should\r\nreduce the noise we see around session_cleanup errors in our
logs.\r\n\r\n\r\n### Release notes\r\nFixes error with opening point in
time query for session deletion by now\r\naccounting for partial
results.\r\n\r\n### Checklist\r\n\r\nCheck the PR satisfies following
conditions. \r\n\r\nReviewers should verify this PR satisfies this list
as well.\r\n\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [x] The PR
description includes the appropriate Release Notes section,\r\nand the
correct `release_node:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"8f12714219ca4b4c8e58678d42e9978c3defa40b"}}]}]
BACKPORT-->

Co-authored-by: Sid <[email protected]>
kibanamachine added a commit to elastic/kibana that referenced this pull request Nov 21, 2024
…ults for PIT query (#200912) (#201205)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Session management] update cleanup to allow partial search results
for PIT query (#200912)](#200912)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT
[{"author":{"name":"Sid","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-21T14:14:54Z","message":"[Session
management] update cleanup to allow partial search results for PIT query
(#200912)\n\nCloses
https://github.com/elastic/kibana/issues/200008\r\n\r\n##
Summary\r\nThis PR updates the session cleanup task to allow partial
results in the\r\npoint in time query used to delete any invalid
sessions.\r\n\r\n\r\n### Notes\r\nUsing a [recently introduced option
by\r\nES](elastic/elasticsearch#111516), the
session\r\ncleanup now allows the PIT to run over partial results. This
should\r\nreduce the noise we see around session_cleanup errors in our
logs.\r\n\r\n\r\n### Release notes\r\nFixes error with opening point in
time query for session deletion by now\r\naccounting for partial
results.\r\n\r\n### Checklist\r\n\r\nCheck the PR satisfies following
conditions. \r\n\r\nReviewers should verify this PR satisfies this list
as well.\r\n\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [x] The PR
description includes the appropriate Release Notes section,\r\nand the
correct `release_node:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"8f12714219ca4b4c8e58678d42e9978c3defa40b","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","Team:Security","v9.0.0","Feature:Security/Session
Management","backport:prev-major"],"title":"[Session management] update
cleanup to allow partial search results for PIT
query","number":200912,"url":"https://github.com/elastic/kibana/pull/200912","mergeCommit":{"message":"[Session
management] update cleanup to allow partial search results for PIT query
(#200912)\n\nCloses
https://github.com/elastic/kibana/issues/200008\r\n\r\n##
Summary\r\nThis PR updates the session cleanup task to allow partial
results in the\r\npoint in time query used to delete any invalid
sessions.\r\n\r\n\r\n### Notes\r\nUsing a [recently introduced option
by\r\nES](elastic/elasticsearch#111516), the
session\r\ncleanup now allows the PIT to run over partial results. This
should\r\nreduce the noise we see around session_cleanup errors in our
logs.\r\n\r\n\r\n### Release notes\r\nFixes error with opening point in
time query for session deletion by now\r\naccounting for partial
results.\r\n\r\n### Checklist\r\n\r\nCheck the PR satisfies following
conditions. \r\n\r\nReviewers should verify this PR satisfies this list
as well.\r\n\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [x] The PR
description includes the appropriate Release Notes section,\r\nand the
correct `release_node:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"8f12714219ca4b4c8e58678d42e9978c3defa40b"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/200912","number":200912,"mergeCommit":{"message":"[Session
management] update cleanup to allow partial search results for PIT query
(#200912)\n\nCloses
https://github.com/elastic/kibana/issues/200008\r\n\r\n##
Summary\r\nThis PR updates the session cleanup task to allow partial
results in the\r\npoint in time query used to delete any invalid
sessions.\r\n\r\n\r\n### Notes\r\nUsing a [recently introduced option
by\r\nES](elastic/elasticsearch#111516), the
session\r\ncleanup now allows the PIT to run over partial results. This
should\r\nreduce the noise we see around session_cleanup errors in our
logs.\r\n\r\n\r\n### Release notes\r\nFixes error with opening point in
time query for session deletion by now\r\naccounting for partial
results.\r\n\r\n### Checklist\r\n\r\nCheck the PR satisfies following
conditions. \r\n\r\nReviewers should verify this PR satisfies this list
as well.\r\n\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [x] The PR
description includes the appropriate Release Notes section,\r\nand the
correct `release_node:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"8f12714219ca4b4c8e58678d42e9978c3defa40b"}}]}]
BACKPORT-->

Co-authored-by: Sid <[email protected]>
kibanamachine added a commit to elastic/kibana that referenced this pull request Nov 21, 2024
…sults for PIT query (#200912) (#201201)

# Backport

This will backport the following commits from `main` to `8.16`:
- [[Session management] update cleanup to allow partial search results
for PIT query (#200912)](#200912)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT
[{"author":{"name":"Sid","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-21T14:14:54Z","message":"[Session
management] update cleanup to allow partial search results for PIT query
(#200912)\n\nCloses
https://github.com/elastic/kibana/issues/200008\r\n\r\n##
Summary\r\nThis PR updates the session cleanup task to allow partial
results in the\r\npoint in time query used to delete any invalid
sessions.\r\n\r\n\r\n### Notes\r\nUsing a [recently introduced option
by\r\nES](elastic/elasticsearch#111516), the
session\r\ncleanup now allows the PIT to run over partial results. This
should\r\nreduce the noise we see around session_cleanup errors in our
logs.\r\n\r\n\r\n### Release notes\r\nFixes error with opening point in
time query for session deletion by now\r\naccounting for partial
results.\r\n\r\n### Checklist\r\n\r\nCheck the PR satisfies following
conditions. \r\n\r\nReviewers should verify this PR satisfies this list
as well.\r\n\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [x] The PR
description includes the appropriate Release Notes section,\r\nand the
correct `release_node:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"8f12714219ca4b4c8e58678d42e9978c3defa40b","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","Team:Security","v9.0.0","Feature:Security/Session
Management","backport:prev-major"],"title":"[Session management] update
cleanup to allow partial search results for PIT
query","number":200912,"url":"https://github.com/elastic/kibana/pull/200912","mergeCommit":{"message":"[Session
management] update cleanup to allow partial search results for PIT query
(#200912)\n\nCloses
https://github.com/elastic/kibana/issues/200008\r\n\r\n##
Summary\r\nThis PR updates the session cleanup task to allow partial
results in the\r\npoint in time query used to delete any invalid
sessions.\r\n\r\n\r\n### Notes\r\nUsing a [recently introduced option
by\r\nES](elastic/elasticsearch#111516), the
session\r\ncleanup now allows the PIT to run over partial results. This
should\r\nreduce the noise we see around session_cleanup errors in our
logs.\r\n\r\n\r\n### Release notes\r\nFixes error with opening point in
time query for session deletion by now\r\naccounting for partial
results.\r\n\r\n### Checklist\r\n\r\nCheck the PR satisfies following
conditions. \r\n\r\nReviewers should verify this PR satisfies this list
as well.\r\n\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [x] The PR
description includes the appropriate Release Notes section,\r\nand the
correct `release_node:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"8f12714219ca4b4c8e58678d42e9978c3defa40b"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/200912","number":200912,"mergeCommit":{"message":"[Session
management] update cleanup to allow partial search results for PIT query
(#200912)\n\nCloses
https://github.com/elastic/kibana/issues/200008\r\n\r\n##
Summary\r\nThis PR updates the session cleanup task to allow partial
results in the\r\npoint in time query used to delete any invalid
sessions.\r\n\r\n\r\n### Notes\r\nUsing a [recently introduced option
by\r\nES](elastic/elasticsearch#111516), the
session\r\ncleanup now allows the PIT to run over partial results. This
should\r\nreduce the noise we see around session_cleanup errors in our
logs.\r\n\r\n\r\n### Release notes\r\nFixes error with opening point in
time query for session deletion by now\r\naccounting for partial
results.\r\n\r\n### Checklist\r\n\r\nCheck the PR satisfies following
conditions. \r\n\r\nReviewers should verify this PR satisfies this list
as well.\r\n\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [x] The PR
description includes the appropriate Release Notes section,\r\nand the
correct `release_node:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"8f12714219ca4b4c8e58678d42e9978c3defa40b"}}]}]
BACKPORT-->

Co-authored-by: Sid <[email protected]>
kibanamachine added a commit to elastic/kibana that referenced this pull request Nov 21, 2024
…sults for PIT query (#200912) (#201203)

# Backport

This will backport the following commits from `main` to `8.17`:
- [[Session management] update cleanup to allow partial search results
for PIT query (#200912)](#200912)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT
[{"author":{"name":"Sid","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-21T14:14:54Z","message":"[Session
management] update cleanup to allow partial search results for PIT query
(#200912)\n\nCloses
https://github.com/elastic/kibana/issues/200008\r\n\r\n##
Summary\r\nThis PR updates the session cleanup task to allow partial
results in the\r\npoint in time query used to delete any invalid
sessions.\r\n\r\n\r\n### Notes\r\nUsing a [recently introduced option
by\r\nES](elastic/elasticsearch#111516), the
session\r\ncleanup now allows the PIT to run over partial results. This
should\r\nreduce the noise we see around session_cleanup errors in our
logs.\r\n\r\n\r\n### Release notes\r\nFixes error with opening point in
time query for session deletion by now\r\naccounting for partial
results.\r\n\r\n### Checklist\r\n\r\nCheck the PR satisfies following
conditions. \r\n\r\nReviewers should verify this PR satisfies this list
as well.\r\n\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [x] The PR
description includes the appropriate Release Notes section,\r\nand the
correct `release_node:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"8f12714219ca4b4c8e58678d42e9978c3defa40b","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","Team:Security","v9.0.0","Feature:Security/Session
Management","backport:prev-major"],"title":"[Session management] update
cleanup to allow partial search results for PIT
query","number":200912,"url":"https://github.com/elastic/kibana/pull/200912","mergeCommit":{"message":"[Session
management] update cleanup to allow partial search results for PIT query
(#200912)\n\nCloses
https://github.com/elastic/kibana/issues/200008\r\n\r\n##
Summary\r\nThis PR updates the session cleanup task to allow partial
results in the\r\npoint in time query used to delete any invalid
sessions.\r\n\r\n\r\n### Notes\r\nUsing a [recently introduced option
by\r\nES](elastic/elasticsearch#111516), the
session\r\ncleanup now allows the PIT to run over partial results. This
should\r\nreduce the noise we see around session_cleanup errors in our
logs.\r\n\r\n\r\n### Release notes\r\nFixes error with opening point in
time query for session deletion by now\r\naccounting for partial
results.\r\n\r\n### Checklist\r\n\r\nCheck the PR satisfies following
conditions. \r\n\r\nReviewers should verify this PR satisfies this list
as well.\r\n\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [x] The PR
description includes the appropriate Release Notes section,\r\nand the
correct `release_node:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"8f12714219ca4b4c8e58678d42e9978c3defa40b"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/200912","number":200912,"mergeCommit":{"message":"[Session
management] update cleanup to allow partial search results for PIT query
(#200912)\n\nCloses
https://github.com/elastic/kibana/issues/200008\r\n\r\n##
Summary\r\nThis PR updates the session cleanup task to allow partial
results in the\r\npoint in time query used to delete any invalid
sessions.\r\n\r\n\r\n### Notes\r\nUsing a [recently introduced option
by\r\nES](elastic/elasticsearch#111516), the
session\r\ncleanup now allows the PIT to run over partial results. This
should\r\nreduce the noise we see around session_cleanup errors in our
logs.\r\n\r\n\r\n### Release notes\r\nFixes error with opening point in
time query for session deletion by now\r\naccounting for partial
results.\r\n\r\n### Checklist\r\n\r\nCheck the PR satisfies following
conditions. \r\n\r\nReviewers should verify this PR satisfies this list
as well.\r\n\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [x] The PR
description includes the appropriate Release Notes section,\r\nand the
correct `release_node:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"8f12714219ca4b4c8e58678d42e9978c3defa40b"}}]}]
BACKPORT-->

Co-authored-by: Sid <[email protected]>
Co-authored-by: Elastic Machine <[email protected]>
paulinashakirova pushed a commit to paulinashakirova/kibana that referenced this pull request Nov 26, 2024
…or PIT query (elastic#200912)

Closes elastic#200008

## Summary
This PR updates the session cleanup task to allow partial results in the
point in time query used to delete any invalid sessions.


### Notes
Using a [recently introduced option by
ES](elastic/elasticsearch#111516), the session
cleanup now allows the PIT to run over partial results. This should
reduce the noise we see around session_cleanup errors in our logs.


### Release notes
Fixes error with opening point in time query for session deletion by now
accounting for partial results.

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.


- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_node:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Dec 12, 2024
…or PIT query (elastic#200912)

Closes elastic#200008

## Summary
This PR updates the session cleanup task to allow partial results in the
point in time query used to delete any invalid sessions.


### Notes
Using a [recently introduced option by
ES](elastic/elasticsearch#111516), the session
cleanup now allows the PIT to run over partial results. This should
reduce the noise we see around session_cleanup errors in our logs.


### Release notes
Fixes error with opening point in time query for session deletion by now
accounting for partial results.

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.


- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_node:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement :Search Foundations/Search Catch all for Search Foundations Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch v8.16.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants