Skip to content

snapshots: fix filesByRange (#9472)#9488

Merged
battlmonstr merged 1 commit intodevelfrom
pr/snapshots_merge_fix
Feb 22, 2024
Merged

snapshots: fix filesByRange (#9472)#9488
battlmonstr merged 1 commit intodevelfrom
pr/snapshots_merge_fix

Conversation

@battlmonstr
Copy link
Copy Markdown
Contributor

The method was iterating over snapshots.segments.Min().segments, but passing the index to view.Segments().

This might lead to a crash, because those 2 collections are different, and the indexes might not match.

view.Segments() only contains the snapshot files that are fully downloaded and indexed.

The code is changed to only use the view files (as it was before).

The method was iterating over snapshots.segments.Min().segments,
but passing the index to view.Segments().

This might lead to a crash, because those 2 collections are different,
and the indexes might not match.

view.Segments() only contains the snapshot files that are fully downloaded and indexed.

The code is changed to only use the view files (as it was before).
@battlmonstr battlmonstr force-pushed the pr/snapshots_merge_fix branch from a668aa0 to 8a1ca21 Compare February 22, 2024 09:05
@battlmonstr
Copy link
Copy Markdown
Contributor Author

battlmonstr commented Feb 22, 2024

release patch: #9489

@battlmonstr battlmonstr merged commit 419a55d into devel Feb 22, 2024
@battlmonstr battlmonstr deleted the pr/snapshots_merge_fix branch February 22, 2024 09:53
yperbasis pushed a commit that referenced this pull request Feb 22, 2024
The method was iterating over snapshots.segments.Min().segments, but
passing the index to view.Segments().

This might lead to a crash, because those 2 collections are different,
and the indexes might not match.

view.Segments() only contains the snapshot files that are fully
downloaded and indexed.

The code is changed to only use the view files (as it was before).
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