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

File/dir replacement doesn't work properly #4506

Closed
calmh opened this issue Nov 13, 2017 · 7 comments

Comments

Projects
None yet
8 participants
@calmh
Copy link
Member

commented Nov 13, 2017

$ go test -v -tags integration -run TestFileTypeChange\$
=== RUN   TestFileTypeChange
2017/11/13 01:01:15 Cleaning...
2017/11/13 01:01:15 Generating files...
2017/11/13 01:01:15 Starting instance 1...
2017/11/13 01:01:17 Starting instance 2...
2017/11/13 01:01:19 Syncing...
2017/11/13 01:01:21 Comparing directories...
2017/11/13 01:01:21 Making some changes...
2017/11/13 01:01:21 Syncing...
2017/11/13 01:01:22 Comparing directories...
--- FAIL: TestFileTypeChange (7.15s)
	filetype_test.go:178: Mismatch; integration.fileInfo{name:".syncthing.dirToReplace.tmp", mode:0x1a4, mod:1510531282000000000, hash:[16]uint8{0xd4, 0x1d, 0x8c, 0xd9, 0x8f, 0x0, 0xb2, 0x4, 0xe9, 0x80, 0x9, 0x98, 0xec, 0xf8, 0x42, 0x7e}, size:0} (s2) != integration.fileInfo{name:"0", mode:0x800001ed, mod:0, hash:[16]uint8{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, size:0} (s1)
FAIL
exit status 1
FAIL	github.com/syncthing/syncthing/test	7.217s
jb@unu:~/s/g/s/s/test $ ls -la s1 s2
s1:
total 0
...
-rw-r--r--   1 jb  staff     0 Nov 13 01:01 dirToReplace
drwxr-xr-x  11 jb  staff   374 Nov 13 01:01 e/
-rw-r--r--   1 jb  staff     0 Nov 13 01:01 emptyDirToReplace
drwxr-xr-x   5 jb  staff   170 Nov 13 01:01 f/
drwxr-xr-x   2 jb  staff    68 Nov 13 01:01 fileToReplace/

s2:
total 0
...
-rw-r--r--   1 jb  staff     0 Nov 13 01:01 .syncthing.dirToReplace.tmp
-rw-r--r--   1 jb  staff     0 Nov 13 01:01 .syncthing.emptyDirToReplace.tmp
...
drwxr-xr-x   2 jb  staff    68 Nov 13 01:01 dirToReplace/
drwxr-xr-x  11 jb  staff   374 Nov 13 01:01 e/
drwxr-xr-x   2 jb  staff    68 Nov 13 01:01 emptyDirToReplace/
drwxr-xr-x   5 jb  staff   170 Nov 13 01:01 f/
drwxr-xr-x   2 jb  staff    68 Nov 13 01:01 fileToReplace/
[MRIW7] 01:01:22 INFO: Puller (folder "default", file "dirToReplace"): finisher: file modified but not rescanned; will try again later
[MRIW7] 01:01:22 INFO: Puller (folder "default", file "emptyDirToReplace"): finisher: file modified but not rescanned; will try again later
[MRIW7] 01:01:22 INFO: Folder default isn't making progress. Pausing puller for 1m0s.

@calmh calmh added the bug label Nov 13, 2017

@Okloks

This comment has been minimized.

Copy link

commented Nov 13, 2017

Up.
Renaming files solves this issude, but this behaviour is still incorrect.

calmh added a commit to calmh/syncthing that referenced this issue Nov 13, 2017

lib/model: Fix rescan detection (fixes syncthing#4505, fixes syncthin…
…g#4506)

Diff is large due to comment reformatting and indentation but all it
does is wrap the file mtime/size/permissions check in an "if
stat.IsRegular()".

@st-review st-review closed this in 2b65e10 Nov 13, 2017

st-review pushed a commit that referenced this issue Nov 13, 2017

lib/model: Handle type changes when pulling (ref #4505 #4506 #4507)
GitHub-Pull-Request: #4509
LGTM: AudriusButkevicius, calmh
@futurist

This comment has been minimized.

Copy link

commented Nov 22, 2017

I encountered this problem, that always showing file modified but not rescanned; will try again later but never end, using version: v0.14.41-rc.3, I found the bug maybe from 2 different windows, the folder name for each is lyoconv and lyOConv, in windows, folder name is case-insensitive, is that the bug from? Just found the problem but have no idea...

@AudriusButkevicius

This comment has been minimized.

Copy link
Member

commented Nov 22, 2017

There is a separate bug for case only changes. This is known not to work.

@calmh calmh added this to the v0.14.41 milestone Dec 3, 2017

@Jarno-P

This comment has been minimized.

Copy link

commented Dec 14, 2017

I am getting this error message with v0.14.41 on Win10 64bit. All in one folder I haven't touched for ages. The issue started when I added my laptop to the "sync pool" for a folder. I solved the issue by moving the whole folder out of syncthing folder root, deleted all the copies in all the computers, waited the sync to finish and then moved it back. I think this was partially due to case differences in a folder. Mixed Linux/Win10 setup.

@jdevora

This comment has been minimized.

Copy link

commented Jan 5, 2018

I have the same? issue, a set of folders and files that I haven't been touched in ages suddenly start to get the error
: finisher: file modified but not rescanned; will try again later

@AudriusButkevicius

This comment has been minimized.

Copy link
Member

commented Jan 5, 2018

Please don't comment on random closed bugs. If you need support, use the forum.

@eduncan911

This comment has been minimized.

Copy link

commented Jul 2, 2018

To anyone else that comes here looking...

Hopping onto the Windows machine that had the issues when I changed the case on my arch linux box, I simply paused the sync, renamed the older manually, and unpaused. It resync'd and everything was happy.

Note: my Windows box was one-way sync (only receives changes, doesn't sync changes itself out to other machines). So that may be a contributing factor.

@syncthing syncthing locked and limited conversation to collaborators Dec 30, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.