Skip retry loop on first check for group

Don't retry checking the DB multiple times on first call to see if group
exists when determining whether the group needs to be created.

If the group exists, a previous iteration would already have waited for
the group to be written down from the cache. So if nothing is returned
then the group does not exist, and there is no point rechecking multiple
times to see if it will appear from the cache.

This speeds up creation of new groups by avoiding a 10 second wait
before creation due to the first call for group uuid unnecessarily
retrying multiple times.

Change-Id: I0afbc716159e8aecf1ade6442d9b02674094fa08
1 file changed