Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Apache: Bugs

[Bug 39815] Atomic Creation of uploaded files in mod_dav

 

 

Apache bugs RSS feed   Index | Next | Previous | View Threaded


bugzilla at apache

Jul 8, 2009, 1:51 PM

Post #1 of 4 (504 views)
Permalink
[Bug 39815] Atomic Creation of uploaded files in mod_dav

https://issues.apache.org/bugzilla/show_bug.cgi?id=39815





--- Comment #6 from Stefan Fritsch <sf [at] sfritsch> 2009-07-08 13:51:25 PST ---
This bug can also cause data loss: When something goes wrong with a PUT request
that replaces a file, the old file will be deleted.


I see three possible solutions:

1) Create a new hook that is called in dav_notify_created() to update the lock
key. This breaks mod_dav's API compatibility and cannot be done in 2.2

2) Use a temp file that is moved over the old file as in Paul's patch, and
switch the lock key from inode to filename.

3) Use a temp file that is copied over the old file. This is slow and doesn't
solve the problem completely.


I would vote for 2), in order to get this into 2.2.

--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe [at] httpd
For additional commands, e-mail: bugs-help [at] httpd


bugzilla at apache

Jul 8, 2009, 1:51 PM

Post #2 of 4 (485 views)
Permalink
[Bug 39815] Atomic Creation of uploaded files in mod_dav [In reply to]

https://issues.apache.org/bugzilla/show_bug.cgi?id=39815


Stefan Fritsch <sf [at] sfritsch> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |sf [at] sfritsch




--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe [at] httpd
For additional commands, e-mail: bugs-help [at] httpd


bugzilla at apache

Jul 10, 2009, 3:09 AM

Post #3 of 4 (464 views)
Permalink
[Bug 39815] Atomic Creation of uploaded files in mod_dav [In reply to]

https://issues.apache.org/bugzilla/show_bug.cgi?id=39815


Mark Szabo <mark [at] asx> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |mark [at] asx




--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe [at] httpd
For additional commands, e-mail: bugs-help [at] httpd


bugzilla at apache

Jul 10, 2009, 10:10 AM

Post #4 of 4 (462 views)
Permalink
[Bug 39815] Atomic Creation of uploaded files in mod_dav [In reply to]

https://issues.apache.org/bugzilla/show_bug.cgi?id=39815


Stefan Fritsch <sf [at] sfritsch> changed:

What |Removed |Added
----------------------------------------------------------------------------
Attachment #18472|0 |1
is obsolete| |




--- Comment #7 from Stefan Fritsch <sf [at] sfritsch> 2009-07-10 10:10:30 PST ---
Created an attachment (id=23956)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=23956)
also disable inode keyed locks and cleanup the tempfile if something goes wrong

Switching to filenames in the lock keys is simple and fixes the litmus
failures. Are there some numbers on what impact this has on performance?

I have also added some code to remove the tmpfile when the new file is not
committed.

For the case that a file is opened seekable and the file existed before, the
file should probably not be deleted on error.

--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe [at] httpd
For additional commands, e-mail: bugs-help [at] httpd

Apache bugs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.