You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#3195 was supposed to fix error handling when posix_fallocate. However it does not fix all of them: AWS has disabled the Linux fallocate and fallocate64 system calls in Lambda and some other environments by making them return EPERM instead of the common EINVAL.
The fix would be to handle EPERM analogous to EINVAL in util/file.cpp, i.e. change the if from
if (status == EINVAL) {
return false; // Retry with non-atomic version
}
to
if (status == EINVAL || status == EPERM) {
return false; // Retry with non-atomic version
}
Expected results
Realm-core should try to use the same fallback it uses when fallocate and fallocate64 return EINVAL.
Actual Results
Error message posix_fallocate() failed: Operation not permitted
#3195 was supposed to fix error handling when
posix_fallocate
. However it does not fix all of them: AWS has disabled the Linuxfallocate
andfallocate64
system calls in Lambda and some other environments by making them returnEPERM
instead of the commonEINVAL
.The fix would be to handle
EPERM
analogous toEINVAL
in util/file.cpp, i.e. change theif
fromto
Expected results
Realm-core should try to use the same fallback it uses when
fallocate
andfallocate64
returnEINVAL
.Actual Results
Error message
posix_fallocate() failed: Operation not permitted
Steps & Code to Reproduce
See for example https://stackoverflow.com/q/57825072/918959
Core version
Core version: all since je/fix-fallocate-problem was merged.
The text was updated successfully, but these errors were encountered: