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

Disable atomic_save by default #379

Closed
FichteFoll opened this issue Jul 14, 2014 · 29 comments
Closed

Disable atomic_save by default #379

FichteFoll opened this issue Jul 14, 2014 · 29 comments

Comments

@FichteFoll
Copy link
Collaborator

The atomic_save feature causes a variety of issues regarding file saving that many people can't identify immediately.

Firstly, it produces bugs such as those marked with the C: Atomic Save label.
Secondly, this is not an OS-level but a software-level implementation that other software does not recognice as a "file modification" so to speak. See comments for examples.

Because of this, it should be disabled by default.

@gerardroche
Copy link

👍

@ghost
Copy link

ghost commented Jul 15, 2014

+1

atomic save is just not working for me on win8

@jbrooksuk
Copy link
Contributor

Disabled on Windows.

@ghost
Copy link

ghost commented Jul 15, 2014

Disabled everywhere in my opinion. On Linux, atomic save screws up group permissions.

@FichteFoll
Copy link
Collaborator Author

It was actually among the first things I disabled when I switched to ST3, so I had those issues long ago and mostly forgot about them already.

@jbrooksuk
Copy link
Contributor

I've never had issues on OSX, has anyone else?

@ghost
Copy link

ghost commented Jul 15, 2014

I have only one issue on my Mac, but it's a pretty special case, still annoying. Basically we're monitoring file changes, and edits through Sublime causes excessive traffic because files are not written to per se, but instead the events generated are created -> delete org -> rename...

In all honesty, I think this feature is not useful at all (people use backups), but causes a lot of problems.

@FichteFoll
Copy link
Collaborator Author

Quoting stikker from the forum:

I'd like to summarize a discussion we had internally about this issue, maybe it's useful for others:

  1. On some Windows configurations, atomic saves are outright buggy and dangerous
  2. On Linux, file metadata is sometimes lost (i believe this is over mounts only, but not sure)
  3. On all OS's there are cases where config-directories allow edits, but not file creates (we have examples in our shop). Atomic save doesn't work at all in these cases.
  4. File monitoring tools, as noted in the issue as well, depending on modify-events are confused since modify, create and delete events are all generated
  5. Saving takes substantially longer over certain mounts
  6. It's not a useful feature at all, the likelyhood of the rename failing during outages (esp. true on osx's fs) is higher than the likelyhood of dataloss on filewrites

Our conclusion is that not only should this feature not be default. It should not be in there at all.

@ghost
Copy link

ghost commented Aug 2, 2014

Given the amount of people reporting this problem on the forums (for Windows mainly), I don't think the "minor" label does justice to this issue.

@FichteFoll
Copy link
Collaborator Author

Agree.

@jbrooksuk
Copy link
Contributor

Bumped to S: major.

@wbond
Copy link
Member

wbond commented Aug 4, 2014

Just for the record, all of those people reporting it are the same person using different user accounts. The user posts either from Tor or from a specific ISP in Norway.

@jbrooksuk
Copy link
Contributor

@wbond on the forum? It's probably the same person who whinges about the recent development speed.

@ghost
Copy link

ghost commented Aug 4, 2014

@wbond trolls aside, I believe even FichteFoll (who seems like an old-timer) mentioned on the forum he had issues with atomic save (right, Fichte?). The points mentioned by stikker above all seem valid to me.

As for the locking problem, I can easily reproduce it on a machine here, so I can upload a video of it happening if proof is needed (from a UK ip to boot...)

@wbond
Copy link
Member

wbond commented Aug 5, 2014

@JavaLama I'm not contesting that people have some issues with it, just providing information in regards to bumping is to "major" since "the amount of people reporting this problem on the forums" is not necessarily true.

@ghost
Copy link

ghost commented Aug 6, 2014

@wbond Ah, fair enough. However, at least a few people have problems and let's face it: problems saving in an editor warrants the "major" label at any rate.

@FichteFoll
Copy link
Collaborator Author

I think of my comment quoting stikker from the forum as the main reason for bumping the severity. It outlines how this saving mode currently has too many issues to warrant enabling it by default.

I've had several error messages from ST being unable to rename some ".tmp" file, probably because of open file handles or similar. Thus, I've disabled it and never missed it.

Yes, atomic saving might be useful in situations, but it's not a traditional way of saving in that it's in fact "renaming". The problem here is that this is not an OS-level but a software-level implementation that other software does not recognice as a "modification" so to speak. It's a feature that, if you depend on it, can still be useful as opt-in, but I doubt that it should opt-out. And, given that there's really quite some issues caused by this - not only reported by the same person -, this is an easy task that can reduce a lot of noise.

@ghost
Copy link

ghost commented Aug 6, 2014

I believe issue #152 should point to #379 (this one) ?

@FichteFoll
Copy link
Collaborator Author

Imo this issue should rather point to #152 since the discussion about disabling atomic_save by default is based on bugs like these, and not the other way around. But anyway, too many references don't hurt I guess. Good find btw.

@michalfita
Copy link

If someone is using ClearCase with dynamic views, that behaviour is unacceptable - deleting the file has serious consequences related to the history tied to the object visible as file.

If anyone is using build system base on notification of changes for selected inodes, then deleting file prior to save destroy all notifications set for those inodes, as you crate new inode every time.

On filesystems like ZFS, where you can maintain changes or snapshots to files stored, deleting the file and creating it again to save would destroy the history of the inode and you'll see now files between snapshots - I don't believe this is what you want.

On NAS storages which serve Samba shares, deleting a file means that when replication happens, the file is deleted on all nodes taking part in replication, and then when new file is saved - whole file has to be transmitted during replication process. What a huge waste of expensive resources for a change containing single space character of difference.

This is just couple example why such feature should never exists. I vote for complete removal of this "atomic" writes.

@ghost
Copy link

ghost commented Aug 12, 2014

Another atomic_save bug appeared as webdav failures: http://www.sublimetext.com/forum/viewtopic.php?f=3&t=16586

@gkatsanos
Copy link

+13453. I wasted hours of NFS problems because of that. Fix it or disable it by default.

@FichteFoll
Copy link
Collaborator Author

Added an atomic save category and relabeled issues.

@danillos
Copy link

danillos commented Nov 6, 2014

@Mule52
Copy link

Mule52 commented Feb 26, 2015

+1, still getting this error with atomic_save: false, using ST3 build 3065

Thanks for any help.

@FichteFoll
Copy link
Collaborator Author

Which error and why would "atomic_save": false solve it (this issue is about the exact opposite)?

@Mule52
Copy link

Mule52 commented Mar 11, 2015

I arrived at this issue from reading here, https://www.sublimetext.com/forum/viewtopic.php?f=2&t=16519.

"This is a known bug that hit me as well: #379

Unfortunately, this is an issue tracker that is not currently tracked by the Sublime Text developer (but may be at a later point IIRC)

I would encourage you to shoot a mail to sublimetext hq - a lot of people are having this issue so it doesn't hurt that they get some mails regarding the issue."

I intermittently receive this error (unable to save, the process cannto access the file because it is being used by another process) when saving a file, in my case a typescript file, on the same system as the original poster in that previous thread. That is why I originally responded to this thread. I will respond to the other thread.

Thanks.

@FichteFoll
Copy link
Collaborator Author

Judging by your forum post, the issue with atomic_save: false seems to be similar to #701 or the same. If you are not using the latest dev build, please try that and see if it was fixed.

I've seen your problem with atomic_save: true before too, but can't find it in the issue list. It's likely a new issue, so please open a new one.

@Mule52
Copy link

Mule52 commented Mar 12, 2015

Thanks. I will try the latest build and see if I can repro.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants