looks like Versioner has stalled ?


(Tom Staels) #1

I’ve come across a ‘thing’ , it looks like File Versioning isn’t deleting items older than maxAge. This I’ve got 22 folders setup just like this one:

    <folder id="puwsr-df3jf" label="EXPO2-DB-BACKUP" path="/srv/dev-disk-by-id-md-name-nas-softraid/syncthing/kate/EXPO2-DB-BACKUP/" type="readwrite" rescanIntervalS="86400" fsWatcherEnabled="false" fsWa
tcherDelayS="10" ignorePerms="false" autoNormalize="true">
        <filesystemType>basic</filesystemType>
        <device id="JKZ4TOI-edited" introducedBy=""></device>
        <device id="YMQ2NTQ-redacted" introducedBy=""></device>
        <minDiskFree unit="%">1</minDiskFree>
        <versioning type="staggered">
            <param key="cleanInterval" val="3600"></param>
            <param key="maxAge" val="1296000"></param>
            <param key="versionsPath" val=""></param>
        </versioning>
        <copiers>0</copiers>
        <pullerMaxPendingKiB>0</pullerMaxPendingKiB>
        <hashers>0</hashers>
        <order>newestFirst</order>
        <ignoreDelete>false</ignoreDelete>
        <scanProgressIntervalS>0</scanProgressIntervalS>
        <pullerPauseS>0</pullerPauseS>
        <maxConflicts>10</maxConflicts>
        <disableSparseFiles>false</disableSparseFiles>
        <disableTempIndexes>false</disableTempIndexes>
        <paused>false</paused>
        <weakHashThresholdPct>25</weakHashThresholdPct>
        <markerName>.stfolder</markerName>
    </folder>

maxage being set to 1296000 seconds, so that’s 15 days. Today is April 9, 2018 so that means that 15 days before today would be March 25, 2018. Yet i am seeing older files:

# ls -l | grep "Mar 21"
-rw-r--r-- 1 admin users    3241472 Mar 21 05:30 DBA_backup_2018_03_21_053003_9896371~20180325-150724.bak
-rw-r--r-- 1 admin users 4072437248 Mar 21 05:05 KATE_backup_2018_03_21_050501_3252195~20180325-150724.bak
-rw-r--r-- 1 admin users    7826944 Mar 21 06:00 KATE_backup_2018_03_21_060001_4585400~20180325-150724.trn
-rw-r--r-- 1 admin users    7305728 Mar 21 06:20 KATE_backup_2018_03_21_062001_1170447~20180325-150724.trn
...

On another folder, that has the same config, I tried stopping & restarting the folder with this result. https://pastebin.com/rGCm6XHs basically it shows many DEBUG: Versioner: Expiring versions , for all old files. Shortly after that, the old files are deleted.

Long story short, I guess stopping & restarting syncthing will clear the symptoms. Before doing this, does any one want to figure out if we’re facing some bug? @AudriusButkevicius @calmH ?


(Jakob Borg) #2

I seem to recall there being some thing about the versioner not starting properly under some circumstances (when a folder is paused/unpaused? edited when already existing? something…) but can’t find the issue at the moment.

That just affects cleanups, not the mechanism that versions files on sync operations.


(Tom Staels) #3

I think that this ‘thing’ started after an unclean poweroff.

ST is still moving files into .stversions , just not deleting any from .stversions. It’s keeping older versions forever.

So, do I get rid of the symptoms, or do we dig deeper first ?


(Audrius Butkevicius) #4

Does it still do that if you launch syncthing with no folders paused (or unpause and restart?)


(Tom Staels) #5

well, if i launch syncthing with no folders paused then i’m sure it will straighten things out, and delete the files > maxage. If i do that, then there won’t be much way of finding out what happened.

Guess I might as well go for it, and bring this back up if it ever happens again.


(Audrius Butkevicius) #6

Well if it fixes it, raise an issue on gitbub given @calmh cant find the original one.