I have a second instance/directory of org-roam running, otherwise fine and working as expected, setup per 18.1 org-roam manual. If I do a org-roam-db-clear-all followed by a org-roam-db-sync I cannot get org-roam-node-find to see all the existing nodes again. This only happens with the secondary instance, from another directory. links work (follows) fine. org-roam-list-files and org-id-update-id-locations identifies correctly - existing nodes just don’t seem to show up when doing org-roam-node-find.
I have observed that only the files that have been already visited (thus buffer exists) when you do db-sync are put into the nodes table of the db. I tried to debug this but don’t know exactly why this is the case.
As a solution, see below.
You can put the following in an org file in the second instance’s directory (so as to use the same .dir-locals.el values) and:
Visit one of the Org files in the second instance’s directory
db-clear-all
db-sync
C-c C-c to evalute the dolist below (if it’s easier for you, you can just evaluate the dolist without putting into Org source block)
EDIT: Sorry, just changing the code to be easier…
EDIT the EDIT: OK, the only the original works. Back to the original code.
Essentially, it visits every file in the org-roam directory, changes the “modified” status – status only, no actual change – and saves it to update the Org-roam db. It might take a while if you have many files, but it has done the job on my end.
Have now also realised that after the db-sync, the links that should have been added to the second instance is instead added/accessible to/from the first/main instance.
seems like unintended behaviour… will open an issue.