-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Fix NPE when indexing a document that just has been deleted in a tsdb index #96461
Merged
martijnvg
merged 6 commits into
elastic:main
from
martijnvg:tsdb/load_timestamp_empty_segment
Jun 1, 2023
Merged
Fix NPE when indexing a document that just has been deleted in a tsdb index #96461
martijnvg
merged 6 commits into
elastic:main
from
martijnvg:tsdb/load_timestamp_empty_segment
Jun 1, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ionAndSeqNoLookup. It can happen that sometimes segments only contain delete tombstone documents. In that case, loading min and max `@timestamp` field values can result into NPE. Because these documents that have a `@timestamp` field. The change fixes that by checking whether numDocs is not zero. These tombstone documents are marked as deleted, so checking whether there are live documents fixes this bug.
Hi @martijnvg, I've created a changelog YAML for you. |
elasticsearchmachine
added
the
Team:Analytics
Meta label for analytical engine team (ESQL/Aggs/Geo)
label
May 31, 2023
Pinging @elastic/es-analytics-geo (Team:Analytics) |
It can happen that sometimes segments only contain delete tombstone documents. In that case, loading min and max `@timestamp` field values can result into NPE. Because these documents that have a `@timestamp` field. This change fixes that by checking for the existence of the `@timestamp` field in the a segment's field infos.
nik9000
approved these changes
May 31, 2023
martijnvg
added
v8.8.1
auto-backport
Automatically create backport pull requests when merged
labels
Jun 1, 2023
💚 Backport successful
|
martijnvg
added a commit
to martijnvg/elasticsearch
that referenced
this pull request
Jun 1, 2023
… index (elastic#96461) Sometimes a segment only contains tombstone documents. In that case, loading min and max @timestamp field values can result into NPE. Because these documents don't have a @timestamp field. This change fixes that by checking for the existence of the @timestamp field in the a segment's field infos.
martijnvg
added a commit
that referenced
this pull request
Jun 1, 2023
…a tsdb index (#96476) Backporting #96461 to 8.8 branch. Sometimes a segment only contains tombstone documents. In that case, loading min and max @timestamp field values can result into NPE. Because these documents don't have a @timestamp field. This change fixes that by checking for the existence of the @timestamp field in the a segment's field infos.
martijnvg
added a commit
that referenced
this pull request
Jun 1, 2023
elasticsearchmachine
pushed a commit
that referenced
this pull request
Jun 9, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
auto-backport
Automatically create backport pull requests when merged
>bug
:StorageEngine/TSDB
You know, for Metrics
Team:Analytics
Meta label for analytical engine team (ESQL/Aggs/Geo)
v8.8.1
v8.9.0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Sometimes a segment only contains tombstone documents. In that case, loading min and max
@timestamp
field values can result into NPE. Because these documents don't have a@timestamp
field.This change fixes that by checking for the existence of the
@timestamp
field in the a segment's field infos.Reproduction of the issue:
Create tsdb index:
Index document:
Delete that document:
Index same document again:
Last api call results in the following error: