Comments (2)
I think this error is about renaming across different volumes, which in general is not an atomic operation so the OS says it can't do it, or at least that's how I understood it.
In the sanitized paths you provided I'm assuming the <username>
and <user>
placeholders are supposed to be the same string, right? If so then it seems weird that this error is thrown when renaming a file within the same folder, which I don't see how it could trigger that error. Maybe the user.json
file is a symlink or something? I've no idea on how to reproduce this issue 🤔 And either way I'm not sure there are alternative strategies that could be used, we just need the rename to work for the write to be actually atomic.
Potentially what you could do is catching that error and falling back to regular writing, but obviously that's not great if you want your writes to not corrupt the file.
from atomically.
I think this error is about renaming across different volumes, which in general is not an atomic operation so the OS says it can't do it, or at least that's how I understood it.
In the sanitized paths you provided I'm assuming the
<username>
and<user>
placeholders are supposed to be the same string, right? If so then it seems weird that this error is thrown when renaming a file within the same folder, which I don't see how it could trigger that error. Maybe theuser.json
file is a symlink or something? I've no idea on how to reproduce this issue 🤔 And either way I'm not sure there are alternative strategies that could be used, we just need the rename to work for the write to be actually atomic.Potentially what you could do is catching that error and falling back to regular writing, but obviously that's not great if you want your writes to not corrupt the file.
Yes, the error should represent the cross volumes error, but I'm pretty sure both files are on the same folder. Currently I try to fallback to directly write the file back as workaround and it works okay.
from atomically.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from atomically.