Magic Folder: implement "Water Dragons" section of design doc #1710

Closed
opened 2012-04-06 03:00:12 +00:00 by daira · 45 comments

The prototype implementation of drop-upload in #1429 adds new or changed files in the local directory to the upload directory, but it does not unlink files in the upload directory when they are deleted locally.

Note that:

  • some users might not want files to be immediately unlinked from the upload directory, in case the local deletion was accidental.
  • the space for unlinked files would not be reclaimed unless and until garbage collection is performed. (This applies already to old versions of changed files.)
The prototype implementation of drop-upload in #1429 adds new or changed files in the local directory to the upload directory, but it does not unlink files in the upload directory when they are deleted locally. Note that: * some users might not want files to be immediately unlinked from the upload directory, in case the local deletion was accidental. * the space for unlinked files would not be reclaimed unless and until garbage collection is performed. (This applies already to old versions of changed files.)
daira added the
c/code-frontend
p/normal
t/enhancement
v/1.9.1
labels 2012-04-06 03:00:12 +00:00
daira added this to the undecided milestone 2012-04-06 03:00:12 +00:00
Author

On 06/04/12 03:20, erpo4 wrote on the vg2 list:

davidsarah wrote:

erpo4 wrote:

I think the drop_upload feature is what I want. Files I put in the
local directory seem to be uploaded to the grid. However, when I
delete the files out of my local directory, the files are not
automatically deleted from the grid. Is this the expected behavior?

Yes, it is. I've just filed
<https://tahoe-lafs.org/trac/tahoe-lafs/ticket/1710> to allow the
automatic deletion behaviour. (This isn't likely to be a priority
to support in the next couple of releases, though, unless someone
volunteers to implement it.)

Just to be clear: I wasn't complaining. :) The only reason I asked was
that it's not the behavior I'm used to from other cloud storage
services (e.g. Ubuntu One). It may actually be preferable not to
autodelete files that have been removed from the drop_upload
directory. In the case that I accidentally rm -rf /drop_upload_dir/*,
I wouldn't want that to wipe out my online backups when tahoe gets
inotify'd. If this is to be a feature, perhaps it should default to
off?

It would indeed default to off, since we don't want the behaviour to change surprisingly from the current behaviour on a Tahoe upgrade.

On 06/04/12 03:20, erpo4 wrote on the vg2 list: > davidsarah wrote: > > erpo4 wrote: > > > I think the drop_upload feature is what I want. Files I put in the > > > local directory seem to be uploaded to the grid. However, when I > > > delete the files out of my local directory, the files are not > > > automatically deleted from the grid. Is this the expected behavior? > > > > Yes, it is. I've just filed > > <<https://tahoe-lafs.org/trac/tahoe-lafs/ticket/1710>> to allow the > > automatic deletion behaviour. (This isn't likely to be a priority > > to support in the next couple of releases, though, unless someone > > volunteers to implement it.) > > Just to be clear: I wasn't complaining. :) The only reason I asked was > that it's not the behavior I'm used to from other cloud storage > services (e.g. Ubuntu One). It may actually be preferable not to > autodelete files that have been removed from the drop_upload > directory. In the case that I accidentally rm -rf /drop_upload_dir/*, > I wouldn't want that to wipe out my online backups when tahoe gets > inotify'd. If this is to be a feature, perhaps it should default to > off? It would indeed default to off, since we don't want the behaviour to change surprisingly from the current behaviour on a Tahoe upgrade.
warner removed the
c/code-frontend
label 2014-12-02 19:49:06 +00:00
Author

Add magic-folder keyword to all drop-upload tickets.

Add magic-folder keyword to all drop-upload tickets.
Author

The intended behaviour for Magic Folder is described at source:docs/proposed/magic-folder/remote-to-local-sync.rst#deletion-of-a-file.

The intended behaviour for Magic Folder is described at source:docs/proposed/magic-folder/remote-to-local-sync.rst#deletion-of-a-file.
daira modified the milestone from undecided to 1.11.0 2015-06-01 16:21:02 +00:00
david415 was assigned by daira 2015-06-01 16:21:02 +00:00
daira changed title from drop-upload: optionally unlink locally deleted files from upload directory to Magic Folder: implement local deletion of files as described in "Air Dragons" section of design doc 2015-06-01 16:21:02 +00:00
daira changed title from Magic Folder: implement local deletion of files as described in "Air Dragons" section of design doc to Magic Folder: implement local deletion of files/directories as described in "Air Dragons" section of design doc 2015-06-01 16:29:39 +00:00
daira changed title from Magic Folder: implement local deletion of files/directories as described in "Air Dragons" section of design doc to Magic Folder: implement local deletion of files/directories as described in "Water Dragons" section of design doc 2015-06-01 16:30:12 +00:00

I wrote some rough draft code that handles the local file deletion case:

this temporary dev branch:
https://github.com/david415/tahoe-lafs/tree/scan-parent

this commit:
https://github.com/david415/tahoe-lafs/commit/a256ddb50d384aa18ac241dcdb9d5757725ad9d2

but we should finish our rebase and cherry-pick this commit onto the new dev branch when it is available...

I wrote some rough draft code that handles the local file deletion case: this temporary dev branch: <https://github.com/david415/tahoe-lafs/tree/scan-parent> this commit: <https://github.com/david415/tahoe-lafs/commit/a256ddb50d384aa18ac241dcdb9d5757725ad9d2> but we should finish our rebase and cherry-pick this commit onto the new dev branch when it is available...

i put those changes here:
https://github.com/david415/tahoe-lafs/tree/2438.otf-objective-4.2-local-file-deletion.1
but we first need to get the tests to pass before working more on this...

i put those changes here: <https://github.com/david415/tahoe-lafs/tree/2438.otf-objective-4.2-local-file-deletion.1> but we first need to get the tests to pass before working more on this...

my latest using an added api call in backupdb.py specifically for checking if a given filename has an entry in the db:

https://github.com/david415/tahoe-lafs/commit/594de028e81ce8afdc536fca4844b4c14fe9f6d0

my latest using an added api call in backupdb.py specifically for checking if a given filename has an entry in the db: <https://github.com/david415/tahoe-lafs/commit/594de028e81ce8afdc536fca4844b4c14fe9f6d0>

in preparation for actually completing this task i've merged in the magic-folder CLI tools dev branch... and thus have been able to prepare tahoe magic-folder test grids using the CLI. Here we've written rough draft versions of test_persistence and test_move_tree that use the magic-folder CLI.

https://github.com/david415/tahoe-lafs/tree/1710.local-deletion-water-dragon.1
https://github.com/david415/tahoe-lafs/commit/0054798c9095466eea8446b66146156c9f2f4dc0
https://github.com/david415/tahoe-lafs/commit/ae9c492b79472fe71a30ee15dece87e29d18b7c1

we've introduced code duplication... next we should make sure all the magic-folder tests share this code instead of duplicating it.

we could benefit from a review but we are not currently blocked

in preparation for actually completing this task i've merged in the magic-folder CLI tools dev branch... and thus have been able to prepare tahoe magic-folder test grids using the CLI. Here we've written rough draft versions of test_persistence and test_move_tree that use the magic-folder CLI. <https://github.com/david415/tahoe-lafs/tree/1710.local-deletion-water-dragon.1> <https://github.com/david415/tahoe-lafs/commit/0054798c9095466eea8446b66146156c9f2f4dc0> <https://github.com/david415/tahoe-lafs/commit/ae9c492b79472fe71a30ee15dece87e29d18b7c1> we've introduced code duplication... next we should make sure all the magic-folder tests share this code instead of duplicating it. we could benefit from a review but we are not currently blocked
cleaned up duplicate code here... <https://github.com/david415/tahoe-lafs/commit/6775c38f3eb40c494d7a06e5fa9dfee97f286507>

i'm building up Alice-Bob tests here so we can have multiple writers to a magic-folder in a test:

https://github.com/david415/tahoe-lafs/tree/1710.local-deletion-water-dragon.1.test-alice-and-bob.1

i'm building up Alice-Bob tests here so we can have multiple writers to a magic-folder in a test: <https://github.com/david415/tahoe-lafs/tree/1710.local-deletion-water-dragon.1.test-alice-and-bob.1>

I had to change the magic-folder cli unit test api when i added the Alice + Bob test. in this commit i fixed the non-Alice+Bob magic-folder CLI tests:
https://github.com/david415/tahoe-lafs/commit/e2ce372cbf02dc2ad56a87b505e157d576b7101b

I had to change the magic-folder cli unit test api when i added the Alice + Bob test. in this commit i fixed the non-Alice+Bob magic-folder CLI tests: <https://github.com/david415/tahoe-lafs/commit/e2ce372cbf02dc2ad56a87b505e157d576b7101b>

I've added a naive downloader and remote scan mechanism... The basic "sharing" between Alice and Bob is working in so far as the unit test passes now.

this dev branch:
https://github.com/david415/tahoe-lafs/tree/1710.local-deletion-water-dragon.1.test-alice-and-bob.1

this commit:
https://github.com/david415/tahoe-lafs/commit/d214c7c2143e75a67a23b47d80220ff4f9837fbd

this test:
./bin/tahoe debug trial allmydata.test.test_magic_folder.RealTest.test_alice_bob

I've added a naive downloader and remote scan mechanism... The basic "sharing" between Alice and Bob is working in so far as the unit test passes now. this dev branch: <https://github.com/david415/tahoe-lafs/tree/1710.local-deletion-water-dragon.1.test-alice-and-bob.1> this commit: <https://github.com/david415/tahoe-lafs/commit/d214c7c2143e75a67a23b47d80220ff4f9837fbd> this test: ./bin/tahoe debug trial allmydata.test.test_magic_folder.RealTest.test_alice_bob

just now added "version" to the magic folder db schema... creating a version 3 of tahoe backupdb schema... which is unutilized by the existing tahoe backup command but is used by only magic folders thus far.

here we also roughly schetch out the addition and deletion behavior with the local version number being incremented by file modifications and deletions...

https://github.com/david415/tahoe-lafs/commit/209c0285be35aaa587cd71aee6bcc1bac4d3e452

just now added "version" to the magic folder db schema... creating a version 3 of tahoe backupdb schema... which is unutilized by the existing tahoe backup command but is used by only magic folders thus far. here we also roughly schetch out the addition and deletion behavior with the local version number being incremented by file modifications and deletions... <https://github.com/david415/tahoe-lafs/commit/209c0285be35aaa587cd71aee6bcc1bac4d3e452>

added deletion/version propagation... and a basic test for that however i am having trouble getting the test_persistence test to pass... here's my latest:

https://github.com/david415/tahoe-lafs/tree/1710.local-deletion-water-dragon.1.test-alice-and-bob.1
https://github.com/david415/tahoe-lafs/commit/ccdba44e8a51787ca39a9db41b975e9290727831

added deletion/version propagation... and a basic test for that however i am having trouble getting the `test_persistence` test to pass... here's my latest: <https://github.com/david415/tahoe-lafs/tree/1710.local-deletion-water-dragon.1.test-alice-and-bob.1> <https://github.com/david415/tahoe-lafs/commit/ccdba44e8a51787ca39a9db41b975e9290727831>
Alice and Bob mock unit test fixed in my dev branch: <https://github.com/david415/tahoe-lafs/tree/1710.local-deletion-water-dragon.1.test-alice-and-bob.1>
Author
Rebased to <https://github.com/tahoe-lafs/tahoe-lafs/commits/1710.test-alice-and-bob.3>.

slight progress with breaking work in progress commits on my dev branch here:
https://github.com/david415/tahoe-lafs/tree/2477.refactor-all-the-things.0

here the alice + bob test checks for proper version numbers... and we can identitify that the current difficulty happens right after alice deletes the file... her magic-folder db entry for that file should be updated with the new version number but it is not... and so the test fails because version number mismatch.

slight progress with breaking work in progress commits on my dev branch here: <https://github.com/david415/tahoe-lafs/tree/2477.refactor-all-the-things.0> here the alice + bob test checks for proper version numbers... and we can identitify that the current difficulty happens right after alice deletes the file... her magic-folder db entry for that file should be updated with the new version number but it is not... and so the test fails because version number mismatch.

more progress in my dev branch... i got rid of the live-lock... however the test exits with a dirty reactor.

more progress in my dev branch... i got rid of the live-lock... however the test exits with a dirty reactor.
Author

Merged David's changes and mine (to use deferredutil.HookMixin) into https://github.com/tahoe-lafs/tahoe-lafs/tree/2477.refactor-all-the-things.1.

Merged David's changes and mine (to use `deferredutil.HookMixin`) into <https://github.com/tahoe-lafs/tahoe-lafs/tree/2477.refactor-all-the-things.1>.

found and fixed two more dropped deferreds but the alice bob unit test still errs:
https://github.com/david415/tahoe-lafs/tree/2477.refactor-all-the-things.1

found and fixed two more dropped deferreds but the alice bob unit test still errs: <https://github.com/david415/tahoe-lafs/tree/2477.refactor-all-the-things.1>
Author

After our Tuesday pairing, tests now pass on that branch.

After our Tuesday pairing, tests now pass on that branch.

I do not believe we've implemented this Water Dragon feature:
"""When a Magic Folder client restarts, we can detect files that had been downloaded but were deleted while it was not running, because their paths will have last-downloaded records in the magic folder db without any corresponding local file."""

I do not believe we've implemented this Water Dragon feature: """When a Magic Folder client restarts, we can detect files that had been downloaded but were deleted while it was not running, because their paths will have last-downloaded records in the magic folder db without any corresponding local file."""
Author

Yes, I believe that's correct (that it is not implemented). As well as scanning for existing files/directories at startup, we should simulate change events for paths in the magic folder db at which no file/directory exists.

We can do that by obtaining the set of all entries in the local_files table before doing the scan, removing paths from that set as we process them, and then processing all those remaining in the set.

Yes, I believe that's correct (that it is not implemented). As well as scanning for existing files/directories at startup, we should simulate change events for paths in the magic folder db at which no file/directory exists. We can do that by obtaining the set of all entries in the `local_files` table before doing the scan, removing paths from that set as we process them, and then processing all those remaining in the set.

i added a get_all_files as a magic-folder db util function...
but this test_persistence unit test seems broken as the startup code path does not run twice like it should...
https://github.com/david415/tahoe-lafs/tree/2489.write_downloaded_file.1

i added a get_all_files as a magic-folder db util function... but this test_persistence unit test seems broken as the startup code path does not run twice like it should... <https://github.com/david415/tahoe-lafs/tree/2489.write_downloaded_file.1>

I'm trying to fix the test_alice_bob test... and I've made some progress here... with this simple commit that teaches the uploader to ignore temp suffix files we create: ".tmp" and ".backup" :

https://github.com/david415/tahoe-lafs/tree/1710.ignore-temp-files.0

I'm trying to fix the `test_alice_bob` test... and I've made some progress here... with this simple commit that teaches the uploader to ignore temp suffix files we create: ".tmp" and ".backup" : <https://github.com/david415/tahoe-lafs/tree/1710.ignore-temp-files.0>
daira changed title from Magic Folder: implement local deletion of files/directories as described in "Water Dragons" section of design doc to Magic Folder: implement "Water Dragons" section of design doc 2015-09-16 14:18:24 +00:00

Daira pointed out yet another bug due to our Uploader / Downloader code refactor;
i made a fix commit here:
https://github.com/david415/tahoe-lafs/tree/2438.magic-folder-stable.1

"""
Add RemoteScanMixin to share our _get_collective_latest_file method

Both the Uploader and Downloader need to know the latest collective
remote file...
"""

https://github.com/david415/tahoe-lafs/commit/6e8728ca0fd6a0186648bb64e187e999255f7bf3

Daira pointed out yet another bug due to our Uploader / Downloader code refactor; i made a fix commit here: <https://github.com/david415/tahoe-lafs/tree/2438.magic-folder-stable.1> """ Add RemoteScanMixin to share our `_get_collective_latest_file` method Both the Uploader and Downloader need to know the latest collective remote file... """ <https://github.com/david415/tahoe-lafs/commit/6e8728ca0fd6a0186648bb64e187e999255f7bf3>
Author

Replying to dawuud:

Daira pointed out yet another bug due to our Uploader / Downloader code refactor;
i made a fix commit here:
https://github.com/david415/tahoe-lafs/commit/6e8728ca0fd6a0186648bb64e187e999255f7bf3

The https://github.com/tahoe-lafs/tahoe-lafs/commits/2438.magic-folder-stable.3 branch fixes this in a different way; the 2438.magic-folder-stable.1 branches are now obsolete.

Replying to [dawuud](/tahoe-lafs/trac/issues/1710#issuecomment-389389): > Daira pointed out yet another bug due to our Uploader / Downloader code refactor; > i made a fix commit here: > <https://github.com/david415/tahoe-lafs/commit/6e8728ca0fd6a0186648bb64e187e999255f7bf3> The <https://github.com/tahoe-lafs/tahoe-lafs/commits/2438.magic-folder-stable.3> branch fixes this in a different way; the 2438.magic-folder-stable.1 branches are now obsolete.

I think we can close this ticket now that all of the deletion propagation features have been implemented.

Can we close it?

I think we can close this ticket now that all of the deletion propagation features have been implemented. Can we close it?
david415 removed their assignment 2015-10-05 12:02:57 +00:00
daira was assigned by david415 2015-10-05 12:02:57 +00:00
Author

We're close, but I need to review whether all of the Water Dragons features have been implemented.

We're close, but I need to review whether all of the Water Dragons features have been implemented.

I think we did not finish implementing deletion i did part of it; and meejah mentioned he added that feature. Please post the dev branch location so we can rebase it into our new dev/stable branches.

I think we did not finish implementing deletion i did part of it; and meejah mentioned he added that feature. Please post the dev branch location so we can rebase it into our new dev/stable branches.
daira was unassigned by david415 2015-10-15 10:58:51 +00:00
meejah was assigned by david415 2015-10-15 10:58:51 +00:00
Author

(https://github.com/tahoe-lafs/tahoe-lafs/commits/2438.magic-folder-stable.4) is the current stable branch (on which we did the demos).

https://github.com/tahoe-lafs/tahoe-lafs/commits/2521.magic-db-schema.1 is the current, broken, development branch.

(https://github.com/tahoe-lafs/tahoe-lafs/commits/2438.magic-folder-stable.4) is the current stable branch (on which we did the demos). <https://github.com/tahoe-lafs/tahoe-lafs/commits/2521.magic-db-schema.1> is the current, broken, development branch.

There's also https://github.com/meejah/tahoe-lafs/commits/1710.actually-unlink-files.0 which I will do a version of rebased onto magic-db-schema.1 (I guess?)

There's also <https://github.com/meejah/tahoe-lafs/commits/1710.actually-unlink-files.0> which I will do a version of rebased onto magic-db-schema.1 (I guess?)
Author

I'm reviewing that branch now.

I'm reviewing that branch now.
meejah was unassigned by daira 2015-10-19 13:39:10 +00:00
daira self-assigned this 2015-10-19 13:39:10 +00:00
Author

My current work-in-progress is at 2521.magic-db-schema.1.wip .

My current work-in-progress is at 2521.magic-db-schema.1.wip .

I have a https://github.com/meejah/tahoe-lafs/commits/1710.actually-unlink-files.1 branch now also, and another unit-test and further smoke test logic.

There's still a case which doesn't work:

If alice creates a file, then bob deletes it, and then alice re-creates it bob never sees it. (It does however, work, if bob is the one to re-create it). I'm still investigating this.

I have a <https://github.com/meejah/tahoe-lafs/commits/1710.actually-unlink-files.1> branch now also, and another unit-test and further smoke test logic. There's still a case which doesn't work: If alice creates a file, then bob deletes it, and then alice re-creates it bob never sees it. (It *does* however, work, if bob is the one to re-create it). I'm still investigating this.

I mean: I have more things to push to the .1 branch, including some as-yet-unwritten code to fix the issue I mention above :)

I mean: I have more things to push to the .1 branch, including some as-yet-unwritten code to fix the issue I mention above :)
Author

daira: dawuud meejah: the deletion bug is an omission in the design doc. in the case of existent files, the event when the file is replaced by the downloader will be ignored because the entry for that path in the magic folder db has the same size/mtime/ctime as the new file
daira: the same should be the case for a deleted file. so the (size, mtime, ctime) in the db needs to be the same as returned by fileutil.get_pathinfo. the latter is (None, now, now) in the current implementation, which I think is probably wrong...
daira: because the current time at the point of the get_pathinfo call won't/can't match the time in the database
daira: the right fix is probably to change get_pathinfo to return PathInfo(isdir=False, isfile=False, islink=False, exists=False, size=None, mtime=None, ctime=None) for the ENOENT case
daira: and make sure that's also what is written to the db when the downloader detects a deleted file

daira: dawuud meejah: the deletion bug is an omission in the design doc. in the case of existent files, the event when the file is replaced by the downloader will be ignored because the entry for that path in the magic folder db has the same size/mtime/ctime as the new file daira: the same *should* be the case for a deleted file. so the (size, mtime, ctime) in the db needs to be the same as returned by `fileutil.get_pathinfo`. the latter is (None, now, now) in the current implementation, which I think is probably wrong... daira: because the current time at the point of the `get_pathinfo` call won't/can't match the time in the database daira: the right fix is probably to change `get_pathinfo` to return `PathInfo(isdir=False, isfile=False, islink=False, exists=False, size=None, mtime=None, ctime=None)` for the `ENOENT` case daira: and make sure that's also what is written to the db when the downloader detects a deleted file
Author

(None is converted to an SQL NULL.)

(`None` is converted to an SQL NULL.)
Author

We also need to think about what happens when a file is replaced by a directory or vice versa. Those are treated as different paths (the directory path ends in /), so it's a bit different from the deleted file case.

We also need to think about what happens when a file is replaced by a directory or vice versa. Those are treated as different paths (the directory path ends in `/`), so it's a bit different from the deleted file case.

the case I have a fix for is: on say "bob's" side if "alice" deletes: the downloader downloads a "delete", so moves the file to "whatever.tmp" but immediately bob's uploader gets an inotify for the moved file, and when that gets processed it uploads another version (with delete=True) -- but so then if "alice" now replaces the file, bob doesn't download it because the versions match.

the case I have a fix for is: on say "bob's" side if "alice" deletes: the downloader downloads a "delete", so moves the file to "whatever.tmp" but immediately bob's uploader gets an inotify for the moved file, and when that gets processed it uploads another version (with delete=True) -- but so then if "alice" now replaces the file, bob doesn't download it because the versions match.
Author

Replying to meejah:

the case I have a fix for is: on say "bob's" side if "alice" deletes: the downloader downloads a "delete", so moves the file to "whatever.tmp"

Do you mean "whatever.backup"? Nothing should ever be moved to "whatever.tmp".

In any case, the IN_MOVED_FROM event for "whatever" should be ignored as described in comment:389406. (The IN_MOVED_TO event should also be ignored because it's for an ignorable filename pattern.)

but immediately bob's uploader gets an inotify for the moved file, and when that gets processed it uploads another version (with delete=True) -- but so then if "alice" now replaces the file, bob doesn't download it because the versions match.

Yes, this sounds like the same case that I was talking about. It isn't a problem that Bob's uploader gets an inotify event, but that event should be ignored because Bob's db should already have been updated with metadata showing that the file has been deleted.

Replying to [meejah](/tahoe-lafs/trac/issues/1710#issuecomment-389409): > the case I have a fix for is: on say "bob's" side if "alice" deletes: the downloader downloads a "delete", so moves the file to "whatever.tmp" Do you mean "whatever.backup"? Nothing should ever be moved to "whatever.tmp". In any case, the IN_MOVED_FROM event for "whatever" should be ignored as described in [comment:389406](/tahoe-lafs/trac/issues/1710#issuecomment-389406). (The IN_MOVED_TO event should also be ignored because it's for an ignorable filename pattern.) > but immediately bob's uploader gets an inotify for the moved file, and when that gets processed it uploads another version (with delete=True) -- but so then if "alice" now replaces the file, bob doesn't download it because the versions match. Yes, this sounds like the same case that I was talking about. It isn't a problem that Bob's uploader gets an inotify event, but that event should be ignored because Bob's db should already have been updated with metadata showing that the file has been deleted.
Author

I will update the design doc tomorrow to clarify what should happen.

I will update the design doc tomorrow to clarify what should happen.
Author

Replying to daira:

I will update the design doc tomorrow to clarify what should happen.

See https://github.com/tahoe-lafs/tahoe-lafs/commit/5d2365f6c4cc388c2d74e43b2c1b7e8fc4c4ab86 (the previous three commits to the design doc are also worth reading).

Replying to [daira](/tahoe-lafs/trac/issues/1710#issuecomment-389411): > I will update the design doc tomorrow to clarify what should happen. See <https://github.com/tahoe-lafs/tahoe-lafs/commit/5d2365f6c4cc388c2d74e43b2c1b7e8fc4c4ab86> (the previous three commits to the design doc are also worth reading).
Author

So, I believe the fix is just to add this before the last line of MagicFolderDB.is_new_file:

if not pathinfo.exists and row[0] is None:
    return False
So, I believe the fix is just to add this before the last line of `MagicFolderDB.is_new_file`: ``` if not pathinfo.exists and row[0] is None: return False ```
Author

Replying to daira:

So, I believe the fix is just to add this before the last line of MagicFolderDB.is_new_file:

if not pathinfo.exists and row[0] is None:
    return False

This fix is on the 2438.magic-folder-stable.5 branch, and there are tests for deletion. So I believe this is fixed, at least until we have a new design that handles the >2-client case.

Replying to [daira](/tahoe-lafs/trac/issues/1710#issuecomment-389413): > So, I believe the fix is just to add this before the last line of `MagicFolderDB.is_new_file`: > ``` > if not pathinfo.exists and row[0] is None: > return False > ``` This fix is on the 2438.magic-folder-stable.5 branch, and there are tests for deletion. So I believe this is fixed, at least until we have a new design that handles the >2-client case.
daira added the
r/fixed
label 2015-12-08 15:13:56 +00:00
daira closed this issue 2015-12-08 15:13:56 +00:00

Milestone renamed

Milestone renamed
warner modified the milestone from 1.11.0 to 1.12.0 2016-03-22 05:02:52 +00:00
Sign in to join this conversation.
No labels
c/code
c/code-dirnodes
c/code-encoding
c/code-frontend
c/code-frontend-cli
c/code-frontend-ftp-sftp
c/code-frontend-magic-folder
c/code-frontend-web
c/code-mutable
c/code-network
c/code-nodeadmin
c/code-peerselection
c/code-storage
c/contrib
c/dev-infrastructure
c/docs
c/operational
c/packaging
c/unknown
c/website
kw:2pc
kw:410
kw:9p
kw:ActivePerl
kw:AttributeError
kw:DataUnavailable
kw:DeadReferenceError
kw:DoS
kw:FileZilla
kw:GetLastError
kw:IFinishableConsumer
kw:K
kw:LeastAuthority
kw:Makefile
kw:RIStorageServer
kw:StringIO
kw:UncoordinatedWriteError
kw:about
kw:access
kw:access-control
kw:accessibility
kw:accounting
kw:accounting-crawler
kw:add-only
kw:aes
kw:aesthetics
kw:alias
kw:aliases
kw:aliens
kw:allmydata
kw:amazon
kw:ambient
kw:annotations
kw:anonymity
kw:anonymous
kw:anti-censorship
kw:api_auth_token
kw:appearance
kw:appname
kw:apport
kw:archive
kw:archlinux
kw:argparse
kw:arm
kw:assertion
kw:attachment
kw:auth
kw:authentication
kw:automation
kw:avahi
kw:availability
kw:aws
kw:azure
kw:backend
kw:backoff
kw:backup
kw:backupdb
kw:backward-compatibility
kw:bandwidth
kw:basedir
kw:bayes
kw:bbfreeze
kw:beta
kw:binaries
kw:binutils
kw:bitcoin
kw:bitrot
kw:blacklist
kw:blocker
kw:blocks-cloud-deployment
kw:blocks-cloud-merge
kw:blocks-magic-folder-merge
kw:blocks-merge
kw:blocks-raic
kw:blocks-release
kw:blog
kw:bom
kw:bonjour
kw:branch
kw:branding
kw:breadcrumbs
kw:brians-opinion-needed
kw:browser
kw:bsd
kw:build
kw:build-helpers
kw:buildbot
kw:builders
kw:buildslave
kw:buildslaves
kw:cache
kw:cap
kw:capleak
kw:captcha
kw:cast
kw:centos
kw:cffi
kw:chacha
kw:charset
kw:check
kw:checker
kw:chroot
kw:ci
kw:clean
kw:cleanup
kw:cli
kw:cloud
kw:cloud-backend
kw:cmdline
kw:code
kw:code-checks
kw:coding-standards
kw:coding-tools
kw:coding_tools
kw:collection
kw:compatibility
kw:completion
kw:compression
kw:confidentiality
kw:config
kw:configuration
kw:configuration.txt
kw:conflict
kw:connection
kw:connectivity
kw:consistency
kw:content
kw:control
kw:control.furl
kw:convergence
kw:coordination
kw:copyright
kw:corruption
kw:cors
kw:cost
kw:coverage
kw:coveralls
kw:coveralls.io
kw:cpu-watcher
kw:cpyext
kw:crash
kw:crawler
kw:crawlers
kw:create-container
kw:cruft
kw:crypto
kw:cryptography
kw:cryptography-lib
kw:cryptopp
kw:csp
kw:curl
kw:cutoff-date
kw:cycle
kw:cygwin
kw:d3
kw:daemon
kw:darcs
kw:darcsver
kw:database
kw:dataloss
kw:db
kw:dead-code
kw:deb
kw:debian
kw:debug
kw:deep-check
kw:defaults
kw:deferred
kw:delete
kw:deletion
kw:denial-of-service
kw:dependency
kw:deployment
kw:deprecation
kw:desert-island
kw:desert-island-build
kw:design
kw:design-review-needed
kw:detection
kw:dev-infrastructure
kw:devpay
kw:directory
kw:directory-page
kw:dirnode
kw:dirnodes
kw:disconnect
kw:discovery
kw:disk
kw:disk-backend
kw:distribute
kw:distutils
kw:dns
kw:do_http
kw:doc-needed
kw:docker
kw:docs
kw:docs-needed
kw:dokan
kw:dos
kw:download
kw:downloader
kw:dragonfly
kw:drop-upload
kw:duplicity
kw:dusty
kw:earth-dragon
kw:easy
kw:ec2
kw:ecdsa
kw:ed25519
kw:egg-needed
kw:eggs
kw:eliot
kw:email
kw:empty
kw:encoding
kw:endpoint
kw:enterprise
kw:enum34
kw:environment
kw:erasure
kw:erasure-coding
kw:error
kw:escaping
kw:etag
kw:etch
kw:evangelism
kw:eventual
kw:example
kw:excess-authority
kw:exec
kw:exocet
kw:expiration
kw:extensibility
kw:extension
kw:failure
kw:fedora
kw:ffp
kw:fhs
kw:figleaf
kw:file
kw:file-descriptor
kw:filename
kw:filesystem
kw:fileutil
kw:fips
kw:firewall
kw:first
kw:floatingpoint
kw:flog
kw:foolscap
kw:forward-compatibility
kw:forward-secrecy
kw:forwarding
kw:free
kw:freebsd
kw:frontend
kw:fsevents
kw:ftp
kw:ftpd
kw:full
kw:furl
kw:fuse
kw:garbage
kw:garbage-collection
kw:gateway
kw:gatherer
kw:gc
kw:gcc
kw:gentoo
kw:get
kw:git
kw:git-annex
kw:github
kw:glacier
kw:globalcaps
kw:glossary
kw:google-cloud-storage
kw:google-drive-backend
kw:gossip
kw:governance
kw:grid
kw:grid-manager
kw:gridid
kw:gridsync
kw:grsec
kw:gsoc
kw:gvfs
kw:hackfest
kw:hacktahoe
kw:hang
kw:hardlink
kw:heartbleed
kw:heisenbug
kw:help
kw:helper
kw:hint
kw:hooks
kw:how
kw:how-to
kw:howto
kw:hp
kw:hp-cloud
kw:html
kw:http
kw:https
kw:i18n
kw:i2p
kw:i2p-collab
kw:illustration
kw:image
kw:immutable
kw:impressions
kw:incentives
kw:incident
kw:init
kw:inlineCallbacks
kw:inotify
kw:install
kw:installer
kw:integration
kw:integration-test
kw:integrity
kw:interactive
kw:interface
kw:interfaces
kw:interoperability
kw:interstellar-exploration
kw:introducer
kw:introduction
kw:iphone
kw:ipkg
kw:iputil
kw:ipv6
kw:irc
kw:jail
kw:javascript
kw:joke
kw:jquery
kw:json
kw:jsui
kw:junk
kw:key-value-store
kw:kfreebsd
kw:known-issue
kw:konqueror
kw:kpreid
kw:kvm
kw:l10n
kw:lae
kw:large
kw:latency
kw:leak
kw:leasedb
kw:leases
kw:libgmp
kw:license
kw:licenss
kw:linecount
kw:link
kw:linux
kw:lit
kw:localhost
kw:location
kw:locking
kw:logging
kw:logo
kw:loopback
kw:lucid
kw:mac
kw:macintosh
kw:magic-folder
kw:manhole
kw:manifest
kw:manual-test-needed
kw:map
kw:mapupdate
kw:max_space
kw:mdmf
kw:memcheck
kw:memory
kw:memory-leak
kw:mesh
kw:metadata
kw:meter
kw:migration
kw:mime
kw:mingw
kw:minimal
kw:misc
kw:miscapture
kw:mlp
kw:mock
kw:more-info-needed
kw:mountain-lion
kw:move
kw:multi-users
kw:multiple
kw:multiuser-gateway
kw:munin
kw:music
kw:mutability
kw:mutable
kw:mystery
kw:names
kw:naming
kw:nas
kw:navigation
kw:needs-review
kw:needs-spawn
kw:netbsd
kw:network
kw:nevow
kw:new-user
kw:newcaps
kw:news
kw:news-done
kw:news-needed
kw:newsletter
kw:newurls
kw:nfc
kw:nginx
kw:nixos
kw:no-clobber
kw:node
kw:node-url
kw:notification
kw:notifyOnDisconnect
kw:nsa310
kw:nsa320
kw:nsa325
kw:numpy
kw:objects
kw:old
kw:openbsd
kw:openitp-packaging
kw:openssl
kw:openstack
kw:opensuse
kw:operation-helpers
kw:operational
kw:operations
kw:ophandle
kw:ophandles
kw:ops
kw:optimization
kw:optional
kw:options
kw:organization
kw:os
kw:os.abort
kw:ostrom
kw:osx
kw:osxfuse
kw:otf-magic-folder-objective1
kw:otf-magic-folder-objective2
kw:otf-magic-folder-objective3
kw:otf-magic-folder-objective4
kw:otf-magic-folder-objective5
kw:otf-magic-folder-objective6
kw:p2p
kw:packaging
kw:partial
kw:password
kw:path
kw:paths
kw:pause
kw:peer-selection
kw:performance
kw:permalink
kw:permissions
kw:persistence
kw:phone
kw:pickle
kw:pip
kw:pipermail
kw:pkg_resources
kw:placement
kw:planning
kw:policy
kw:port
kw:portability
kw:portal
kw:posthook
kw:pratchett
kw:preformance
kw:preservation
kw:privacy
kw:process
kw:profile
kw:profiling
kw:progress
kw:proxy
kw:publish
kw:pyOpenSSL
kw:pyasn1
kw:pycparser
kw:pycrypto
kw:pycrypto-lib
kw:pycryptopp
kw:pyfilesystem
kw:pyflakes
kw:pylint
kw:pypi
kw:pypy
kw:pysqlite
kw:python
kw:python3
kw:pythonpath
kw:pyutil
kw:pywin32
kw:quickstart
kw:quiet
kw:quotas
kw:quoting
kw:raic
kw:rainhill
kw:random
kw:random-access
kw:range
kw:raspberry-pi
kw:reactor
kw:readonly
kw:rebalancing
kw:recovery
kw:recursive
kw:redhat
kw:redirect
kw:redressing
kw:refactor
kw:referer
kw:referrer
kw:regression
kw:rekey
kw:relay
kw:release
kw:release-blocker
kw:reliability
kw:relnotes
kw:remote
kw:removable
kw:removable-disk
kw:rename
kw:renew
kw:repair
kw:replace
kw:report
kw:repository
kw:research
kw:reserved_space
kw:response-needed
kw:response-time
kw:restore
kw:retrieve
kw:retry
kw:review
kw:review-needed
kw:reviewed
kw:revocation
kw:roadmap
kw:rollback
kw:rpm
kw:rsa
kw:rss
kw:rst
kw:rsync
kw:rusty
kw:s3
kw:s3-backend
kw:s3-frontend
kw:s4
kw:same-origin
kw:sandbox
kw:scalability
kw:scaling
kw:scheduling
kw:schema
kw:scheme
kw:scp
kw:scripts
kw:sdist
kw:sdmf
kw:security
kw:self-contained
kw:server
kw:servermap
kw:servers-of-happiness
kw:service
kw:setup
kw:setup.py
kw:setup_requires
kw:setuptools
kw:setuptools_darcs
kw:sftp
kw:shared
kw:shareset
kw:shell
kw:signals
kw:simultaneous
kw:six
kw:size
kw:slackware
kw:slashes
kw:smb
kw:sneakernet
kw:snowleopard
kw:socket
kw:solaris
kw:space
kw:space-efficiency
kw:spam
kw:spec
kw:speed
kw:sqlite
kw:ssh
kw:ssh-keygen
kw:sshfs
kw:ssl
kw:stability
kw:standards
kw:start
kw:startup
kw:static
kw:static-analysis
kw:statistics
kw:stats
kw:stats_gatherer
kw:status
kw:stdeb
kw:storage
kw:streaming
kw:strports
kw:style
kw:stylesheet
kw:subprocess
kw:sumo
kw:survey
kw:svg
kw:symlink
kw:synchronous
kw:tac
kw:tahoe-*
kw:tahoe-add-alias
kw:tahoe-admin
kw:tahoe-archive
kw:tahoe-backup
kw:tahoe-check
kw:tahoe-cp
kw:tahoe-create-alias
kw:tahoe-create-introducer
kw:tahoe-debug
kw:tahoe-deep-check
kw:tahoe-deepcheck
kw:tahoe-lafs-trac-stream
kw:tahoe-list-aliases
kw:tahoe-ls
kw:tahoe-magic-folder
kw:tahoe-manifest
kw:tahoe-mkdir
kw:tahoe-mount
kw:tahoe-mv
kw:tahoe-put
kw:tahoe-restart
kw:tahoe-rm
kw:tahoe-run
kw:tahoe-start
kw:tahoe-stats
kw:tahoe-unlink
kw:tahoe-webopen
kw:tahoe.css
kw:tahoe_files
kw:tahoewapi
kw:tarball
kw:tarballs
kw:tempfile
kw:templates
kw:terminology
kw:test
kw:test-and-set
kw:test-from-egg
kw:test-needed
kw:testgrid
kw:testing
kw:tests
kw:throttling
kw:ticket999-s3-backend
kw:tiddly
kw:time
kw:timeout
kw:timing
kw:to
kw:to-be-closed-on-2011-08-01
kw:tor
kw:tor-protocol
kw:torsocks
kw:tox
kw:trac
kw:transparency
kw:travis
kw:travis-ci
kw:trial
kw:trickle
kw:trivial
kw:truckee
kw:tub
kw:tub.location
kw:twine
kw:twistd
kw:twistd.log
kw:twisted
kw:twisted-14
kw:twisted-trial
kw:twitter
kw:twn
kw:txaws
kw:type
kw:typeerror
kw:ubuntu
kw:ucwe
kw:ueb
kw:ui
kw:unclean
kw:uncoordinated-writes
kw:undeletable
kw:unfinished-business
kw:unhandled-error
kw:unhappy
kw:unicode
kw:unit
kw:unix
kw:unlink
kw:update
kw:upgrade
kw:upload
kw:upload-helper
kw:uri
kw:url
kw:usability
kw:use-case
kw:utf-8
kw:util
kw:uwsgi
kw:ux
kw:validation
kw:variables
kw:vdrive
kw:verify
kw:verlib
kw:version
kw:versioning
kw:versions
kw:video
kw:virtualbox
kw:virtualenv
kw:vista
kw:visualization
kw:visualizer
kw:vm
kw:volunteergrid2
kw:volunteers
kw:vpn
kw:wapi
kw:warners-opinion-needed
kw:warning
kw:weapi
kw:web
kw:web.port
kw:webapi
kw:webdav
kw:webdrive
kw:webport
kw:websec
kw:website
kw:websocket
kw:welcome
kw:welcome-page
kw:welcomepage
kw:wiki
kw:win32
kw:win64
kw:windows
kw:windows-related
kw:winscp
kw:workaround
kw:world-domination
kw:wrapper
kw:write-enabler
kw:wui
kw:x86
kw:x86-64
kw:xhtml
kw:xml
kw:xss
kw:zbase32
kw:zetuptoolz
kw:zfec
kw:zookos-opinion-needed
kw:zope
kw:zope.interface
p/blocker
p/critical
p/major
p/minor
p/normal
p/supercritical
p/trivial
r/cannot reproduce
r/duplicate
r/fixed
r/invalid
r/somebody else's problem
r/was already fixed
r/wontfix
r/worksforme
t/defect
t/enhancement
t/task
v/0.2.0
v/0.3.0
v/0.4.0
v/0.5.0
v/0.5.1
v/0.6.0
v/0.6.1
v/0.7.0
v/0.8.0
v/0.9.0
v/1.0.0
v/1.1.0
v/1.10.0
v/1.10.1
v/1.10.2
v/1.10a2
v/1.11.0
v/1.12.0
v/1.12.1
v/1.13.0
v/1.14.0
v/1.15.0
v/1.15.1
v/1.2.0
v/1.3.0
v/1.4.1
v/1.5.0
v/1.6.0
v/1.6.1
v/1.7.0
v/1.7.1
v/1.7β
v/1.8.0
v/1.8.1
v/1.8.2
v/1.8.3
v/1.8β
v/1.9.0
v/1.9.0-s3branch
v/1.9.0a1
v/1.9.0a2
v/1.9.0b1
v/1.9.1
v/1.9.2
v/1.9.2a1
v/cloud-branch
v/unknown
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: tahoe-lafs/trac#1710
No description provided.