I could not find an API which would do the following:
- start transaction
bfcquery for resource X
- if absent,
bfcadd X
- end transaction
I am afraid that I will run into race condition if two processes both query, both get negative result, then they both add at once.
Is there a way to remove a possibility of such a race condition?