summaryrefslogtreecommitdiff
path: root/apps/couch/src/couch_server.erl
AgeCommit message (Collapse)Author
2012-11-14Add an index keyed on LRU for faster candidate IDAdam Kocoloski
Our current implementation for closing an LRU DB involves a full scan of a public ets table. This scan blocks all other activity in couch_server and can become a serious bottleneck when the LRU cache hit rate drops too low. In the worst-case all_dbs_active scenario we end up with O(N**2) algorithmic complexity. This patch adds a new index keyed on LRU for faster access to the least recently used databases. It also moves the ets table to a dict on the couch_server heap. The downside is an increased message rate inbound on the couch_server, as clients are no longer allowed to update the LRU data structures without sending a message. BugzID: 12879 Conflicts: apps/couch/src/couch_server.erl
2011-10-13Fix badarg error in couch_server:try_close_lru/1Paul J. Davis
The race condition in couch_server's ets table usage rears its ugly head by leaving an entry in couch_lru. This patch just addresses the issue by allowing the client pid to use the db and ignores the fact that for the duration its over the max_dbs_open setting.
2011-09-12Add missing database 'created' event.benoitc
The `created` event is emitted on apache couchdb when a database is created. This patch re-add it to bigcouch.
2011-06-13Merge CouchDB 1.1Robert Newson
2011-04-18Monitor Fd after creating DBRobert Dionne
This patch has the side effect of fixing a crash of the _users DB after the first minute of running. The crash occurs because BigCouch presumes that couch_stats_collector is monitoring the file descriptor, but nothing prevents the supervisor from starting couch_auth_cache (and thus opening the _users DB) before couch_stats_collector is started. The start order is determined by the ordering of the children from the config file in couch_config's ets set. Closes #39 BugzID: 11854
2011-02-24Improve the way we generate the match spec for a #db{}Adam Kocoloski
2011-01-20Make shards visible on backend, be more strict about namingAdam Kocoloski
BugzID: 10162
2011-01-02Allow client to specify a timeout when opening a DBAdam Kocoloski
2010-08-27fix a bad cherry-pickAdam Kocoloski
2010-08-27server and client should both update LRU table, BugzID 10755Adam Kocoloski
2010-08-27remove some loggingAdam Kocoloski
2010-08-18new version() call allows for hidden patch releasesAdam Kocoloski
2010-08-18Grab bag of Cloudant patches to couch OTP applicationAdam Kocoloski
- Removal of couch_db and couch_ref_counter processes. Active DBs are accessible through a protected ets table owned by couch_server. - #full_doc_info{} in by_id and by_seq trees for faster compaction at the expense of more disk usage afterwards. Proposed as COUCHDB-738 but not accepted upstream. - Replication via distributed Erlang. - Better hot upgrade support (uses exported functions much more often). - Configurable btree chunk sizes allow for larger (but still bounded) reductions. - Shorter names for btree fields in #db{} and #db_header{}. - couch_view_group does not keep a reference to the #db{}. - Terms are stored compressed (again).
2010-08-11reorganize couch .erl and driver code into rebar layoutAdam Kocoloski