# Endless loop when doing a sync --force after keyword reorganization

**URL:** <https://forum.photostructure.com/t/endless-loop-when-doing-a-sync-force-after-keyword-reorganization/686>\
**Category:** 🪲 Bug\
**Created:** [June 16, 2021, 9:28am UTC](https://forum.photostructure.com/t/endless-loop-when-doing-a-sync-force-after-keyword-reorganization/686 "2021-06-16T09:28:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hanpq](https://forum.photostructure.com/user_avatar/forum.photostructure.com/hanpq/32/125_2.png) [@hanpq](https://forum.photostructure.com/u/hanpq)\
**Post date:** [June 16, 2021, 9:28am UTC](https://forum.photostructure.com/t/endless-loop-when-doing-a-sync-force-after-keyword-reorganization/686/1 "2021-06-16T09:28:48Z")

</div>

## Expected Behavior

Force Resync to complete

## Current Behavior

I’m working to get my keywords organized so occationally I want to do a resync with --force to pickup Keyword changes. Worth noting is that I did root tree renaming so it is expected that alot of existing tags in the database should be removed, I don’t know if that has something to do with this.

So i run ./photostructure sync --force but it seems to have encountered an endless loop. I enabled logging and also SQL-logging

{“ts”:1623835038309,“l”:“debug”,“ctx”:“DbRequest”,“msg”:“all(): select \* from `Tag` order by `id` asc limit 128”}

{“ts”:1623835038309,“l”:“debug”,“ctx”:“DbRequest”,“msg”:“run(): insert into `tag_fts` (`path`, `root`, `rowid`) values ("Type Image", "Type", 8)”}

=||= (…I quess ~2500 rows with lots of tags, my removed tags included)

{“ts”:1623835038904,“l”:“debug”,“ctx”:“DbRequest”,“msg”:“run(): insert into `tag_fts` (`path`, `root`, `rowid`) values ("Keywords Locations Sverige Linköping", "Keywords", 2450)”}

{“ts”:1623835038904,“l”:“debug”,“ctx”:“DbRequest”,“msg”:“all(): select \* from `Tag` where `id` \> 2450 order by `id` asc limit 128”}  
{“ts”:1623835038904,“l”:“warn”,“ctx”:“TagSql”,“msg”:“runTagMaintenance(): completed in 595ms”}  
{“ts”:1623835044329,“l”:“info”,“ctx”:“Tag”,“msg”:“findByPath”,“meta”:{“tagPath”:[“fs”],“dbIsNull”:false}}  
{“ts”:1623835044329,“l”:“debug”,“ctx”:“DbRequest”,“msg”:“get(): select \* from `Tag` where `_path` like "fs\u001f"”}  
{“ts”:1623835044329,“l”:“debug”,“ctx”:“DbRequest”,“msg”:“all(): select \* from `Tag` where `parentId` = 645 order by COALESCE(ordinal, \_path) COLLATE NOCASE”}  
{“ts”:1623835044329,“l”:“info”,“ctx”:“updateTagMountpoints()”,“msg”:“updated tag”,“meta”:{“id”:648,“path”:[“fs”,“3bkauEvc3”],“displayName”:“My Book Duo”}}  
{“ts”:1623835044329,“l”:“debug”,“ctx”:“DbRequest”,“msg”:“get(): select `mountpoint` from `AssetFile` where `uri` like "psfile://e:/%" limit 1”}  
{“ts”:1623835044329,“l”:“debug”,“ctx”:“updateTagMountpoints()”,“msg”:“cannot update tag: no current volume.”,“meta”:{“id”:2143,“path”:[“fs”,“e:”]}}  
{“ts”:1623835044329,“l”:“info”,“ctx”:“updateTagMountpoints()”,“msg”:“updated tag”,“meta”:{“id”:1883,“path”:[“fs”,“TNjQAVZj4”],“displayName”:“App”}}  
{“ts”:1623835044329,“l”:“debug”,“ctx”:“DbRequest”,“msg”:“all(): WITH RECURSIVE ancestors(id) AS ( SELECT tagId FROM ChangedTag UNION SELECT Tag.parentId FROM Tag, ancestors WHERE Tag.id = ancestors.id ) SELECT id FROM ancestors”}  
{“ts”:1623835044329,“l”:“debug”,“ctx”:“DbRequest”,“msg”:“run(): INSERT INTO tag\_fts(tag\_fts) VALUES(‘delete-all’)”}  
{“ts”:1623835044329,“l”:“debug”,“ctx”:“DbRequest”,“msg”:“all(): select \* from `Tag` order by `id` asc limit 128”}

And then it just seems to repeat the above over and over again.

## Steps to Reproduce

## Environment

Windows 2019 Server, Node  
Beta7

---

<div class="post-metadata">

**Author:** ![mrm](https://forum.photostructure.com/user_avatar/forum.photostructure.com/mrm/32/1881_2.png) [@mrm](https://forum.photostructure.com/u/mrm)\
**Post date:** [June 16, 2021, 10:08pm UTC](https://forum.photostructure.com/t/endless-loop-when-doing-a-sync-force-after-keyword-reorganization/686/2 "2021-06-16T22:08:01Z")

</div>

Thanks for taking the time to report this!

I’ve rewritten the tag mountpoint update code in beta.8, so I expect this issue to be resolved as soon as I push this build.

---

<div class="post-metadata">

**Author:** ![mrm](https://forum.photostructure.com/user_avatar/forum.photostructure.com/mrm/32/1881_2.png) [@mrm](https://forum.photostructure.com/u/mrm)\
**Post date:** [June 18, 2021, 5:34pm UTC](https://forum.photostructure.com/t/endless-loop-when-doing-a-sync-force-after-keyword-reorganization/686/3 "2021-06-18T17:34:08Z")

</div>

Beta.9 is out: is this fixed for you?

> [@1.0.0-beta.9 is ready](https://forum.photostructure.com/t/1-0-0-beta-9-is-ready/693):
>
> What’s in v1.0.0-beta.9?sparkles/bug Fixed a race condition in child process handling affecting videos and raw images that could cause these files to not be imported. …and everything in v1.0.0-beta.8:sparkles Added new disableAllFilters setting, that forces all filter settings to their most permissive value. sparkles Added new ffmpegHwaccel setting enabling [FFmpeg hardware-accelerated transcoding](https://forum.photostructure.com/t/hardware-accelerated-encoding-transcoding/166). sparkles Transcoded videos now support [high gamut output](https://forum.photostructure.com/t/poor-transcoding-of-videos-in-wider-color-spaces-rec-2020/646). sparkles Ad…

---

<div class="post-metadata">

**Author:** ![hanpq](https://forum.photostructure.com/user_avatar/forum.photostructure.com/hanpq/32/125_2.png) [@hanpq](https://forum.photostructure.com/u/hanpq)\
**Post date:** [June 18, 2021, 7:57pm UTC](https://forum.photostructure.com/t/endless-loop-when-doing-a-sync-force-after-keyword-reorganization/686/4 "2021-06-18T19:57:51Z")

</div>

Yes 🙂 , it has not completed yet (inprogress) but it has gone past where it looped before, happened directly at start. So this can be closed 👍
