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

Support AWS Lambda #3193

Closed
emanuelez opened this issue Dec 13, 2018 · 1 comment · Fixed by #3195
Closed

Support AWS Lambda #3193

emanuelez opened this issue Dec 13, 2018 · 1 comment · Fixed by #3195

Comments

@emanuelez
Copy link
Contributor

AWS Lambda only allows writing to a folder which is mounted with a file system that does not support posix_fallocate. This means that Realm will fail and throw an exception:

Error: posix_fallocate() failed: Operation not permitted

which comes from here: https://github.com/realm/realm-core/blob/master/src/realm/util/file.cpp#L822

Basically, the problem is that we take a decision at compile time, when only at runtime we really have all the elements to take it.

I think that, before throwing that exception, we should try falling back to the non-atomic version (available here: https://github.com/realm/realm-core/blob/master/src/realm/util/file.cpp#L690) if posix_fallocate returns EINVAL.

@realm-probot
Copy link

realm-probot bot commented Dec 14, 2018

Hey - looks like you forgot to add a T:* label - could you please add one?

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant