opscode/chef — pull request #1284 by sdelano (2014-02-26 06:01:43+00:00)
Title: CouchDB Creation Speedup

Ping @jamesc @danielsdeleo @stevendanna @sersut

When pre-creating organizations in Hosted Chef, the account service
provisions a database for the few remaining data types that are
stored in CouchDB. As the number of organizations (and databases) grows,
the length of time it takes to list all couch databases is extended and
can cause timeouts at the nginx level. This patch prevents this extra
call when the caller sets `chef_for_existing` to false, as the account
service already does.

Unit tests have been added to test this functionality, but the only way
I was able to run them was to run the specific tests I edited:

```
cd chef
bundle install
bundle exec rspec spec/unit/couchdb_spec.rb
```