-
Committer:
Robert Bruce Park
-
Date:
2012-09-18 20:34:24 UTC
-
Revision ID:
robert.park@canonical.com-20120918203424-fyif1udyr5c4m26v
Add a publish_lock to avoid race conditions.
We are checking for duplicates first, and then appending new rows later,
which creates a race condition in between (eg, some other thread can easily
insert a duplicate row after we find that there are no duplicates present, but
before we get around to appending our own row).
This makes duplicate checking / row appends atomic.