Skip to content

[query] Allow seeks more than MAX_INT bytes away #12164

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

Merged

Conversation

daniel-goldstein
Copy link
Contributor

@daniel-goldstein daniel-goldstein commented Sep 8, 2022

This assert is here because the buffer we use in the FS is a Java array and can't be longer than MAX_INT, but clearly the position in the blob can be more than that. This currently breaks range reads into indexes on data that's more than 2GiB.

@daniel-goldstein daniel-goldstein marked this pull request as ready for review September 8, 2022 18:36
// 256 * 8MiB = 2GiB
while (i < 256) {
os.write(eight_mib, 0, Int.MaxValue)
i += 1
Copy link
Contributor Author

@daniel-goldstein daniel-goldstein Sep 8, 2022

Choose a reason for hiding this comment

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

I clearly can't write scala 🤦

danking
danking previously requested changes Sep 8, 2022
val f = t()
using (fs.create(f)) { os =>
val eight_mib = Array.fill(8 * 1024 * 1024){0.toByte}
val i = 0
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
val i = 0
var i = 0

@danking danking merged commit dbfd257 into hail-is:main Sep 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants