Observation counts for two users combined less than each individually

One thing the Dronefly bot does is produce displays that include counts of each individual’s observations & species, and a total line at the bottom which, in a single API call, totals up how much they have together. The observations of each individual should add up to the total, and the species count should be a superset. And that worked reliably until I saw it break with one particular user when their observations were added to the display. I can’t for the life of me figure out why. It’s easily reproducible on the web with the same queries the bot uses.


4 observations, 2 species above for the 1st user.


16 observations, 4 species above for the 2nd user, the one that’s going missing in the total …


5 observations, 3 species here? What happened to the other 15 observations by dendrocygna? It seems it has only counted one, and the rest have been thrown into the bit bucket.

1 Like

I tried going and saving each of those taxa, and it seemed to have made O. bilamellata show up. I saved each of the taxa from Aeolidia to Nudibranchia and then the observation count went up to 14 but the species didn’t change.

Then I changed the DQA on each of the “missing” observations and it looks like the rest showed up.

1 Like

Strange. OK, so now I know a procedure to fix it if it happens again, but I’d sure like to know why that works at all. I guess some index that isn’t used when searching for a single user_id, but only used when there are multiple was broken?

this is probably similar to whatever is/was going on here: https://forum.inaturalist.org/t/the-map-does-not-show-all-observations/7838.

1 Like

My first thought was that a taxon didn’t get updated properly, and resaving them pushes that through. Changing the DQA does the same for individual observations but I’ve never had to try both before. In other similar issue I’ve had the observation(s) would have showed up or not regardless of how many users there were so that’s a little strange. I also don’t know that it wasn’t just one thing that fixed it and took a while to update.

I don’t really know how the underlying code works but that sounds plausible to me.