Closed IonoclastBrigham closed 6 years ago
Looks like this was happening because there were duplicate tag entries in the tags
table. This was possible because I improperly disabled the unique
attribute on the Tag_label
column, which shouldn't happen in normal usage, but for ultimate correctness the code should be doing an upsert
operation.
According to the racquel docs, I already set this to be a thing. Using save-data-object
will insert into the database if it is new or update if it already exists.
Bug in racquel?
I'm gonna close this, since it looks like it's self-inflicted. Let's keep it in mind, though, if we see future evidence that racquel might not be updating extant records correctly.
STR
Expected Result
Actual Results
Discussion
This only seems to happen sometimes. I haven't been able to narrow down what the minimal steps to reliably trigger it are. But, once I got in this state, it happened nearly every time I tried to save.
I can say I first noticed it when I opened a collection from the command line like
$ find ~/images -type f -name '*foo*' | xargs ivy
. It's possible the large number of commandline args (over 100) caused something to get gummed up.