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

Fix file reading in ccr restore service (#38117) #38143

Merged
merged 1 commit into from
Feb 1, 2019

Conversation

Tim-Brooks
Copy link
Contributor

Currently we use the raw byte array length when calling the IndexInput
read call to determine how many bytes we want to read. However, due to
how BigArrays works, the array length might be longer than the reference
length. This commit fixes the issue and uses the BytesRef length when
calling read. Additionally, it expands the index follow test to index
many more documents. These documents should potentially lead to large
enough segment files to trigger scenarios where this fix matters.

Currently we use the raw byte array length when calling the IndexInput
read call to determine how many bytes we want to read. However, due to
how BigArrays works, the array length might be longer than the reference
length. This commit fixes the issue and uses the BytesRef length when
calling read. Additionally, it expands the index follow test to index
many more documents. These documents should potentially lead to large
enough segment files to trigger scenarios where this fix matters.
@Tim-Brooks Tim-Brooks added >bug :Distributed Indexing/CCR Issues around the Cross Cluster State Replication features backport v6.7.0 labels Feb 1, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed

@Tim-Brooks Tim-Brooks merged commit 9c2d1e6 into elastic:6.x Feb 1, 2019
@Tim-Brooks Tim-Brooks deleted the backport_fix_reader branch April 30, 2020 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport >bug :Distributed Indexing/CCR Issues around the Cross Cluster State Replication features v6.7.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants