summaryrefslogtreecommitdiff
path: root/src/couchdb/couch_server.erl
AgeCommit message (Collapse)Author
2010-06-02trailing whitespace pedantryJan Lehnardt
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@950545 13f79535-47bb-0310-9956-ffa450edef68
2010-05-04use keysearch BIF to search ejson props. Closes COUCHDB-747Adam Kocoloski
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@940708 13f79535-47bb-0310-9956-ffa450edef68
2010-04-02change couch_server calls to have infinity timeout, because it might have to ↵Damien F. Katz
wait for disk io. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@930365 13f79535-47bb-0310-9956-ffa450edef68
2010-04-02Deterministic/synchronous shutdown code.Damien F. Katz
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@930363 13f79535-47bb-0310-9956-ffa450edef68
2010-03-16Fixes couch_server:all_databases/0Paul Joseph Davis
The logic was failing when the database path had a '.' path component in the middle because Filename -- Root is not a prefix operation. This patch adds a normalization function to couch_util that is run on the Root and Filename variables before doing the array subtraction. I could probably make it smarter and error out but I got lazy. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@923526 13f79535-47bb-0310-9956-ffa450edef68
2010-03-15Made the opening of databases asynchronous, so that requests to open ↵Damien F. Katz
databases that are already in the open database cache do not have to wait on the file system. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@923456 13f79535-47bb-0310-9956-ffa450edef68
2010-03-04reverting damien's latest commit until we can figure out why it's causing ↵John Christopher Anderson
failures git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@918834 13f79535-47bb-0310-9956-ffa450edef68
2010-03-04Changed process tree shutdown to be synchronous, to eliminate spurious test ↵Damien F. Katz
failures caused by processes not shutdown fast enough or at the wrong time. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@918805 13f79535-47bb-0310-9956-ffa450edef68
2010-01-09make the default account db called _users, not usersJohn Christopher Anderson
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@897531 13f79535-47bb-0310-9956-ffa450edef68
2009-09-13allow config callbacks to get passed the X-Couch-Persist flagJan Lehnardt
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@814300 13f79535-47bb-0310-9956-ffa450edef68
2009-09-09choice of uuid algos for better insert perf. Closes COUCHDB-465. Thanks ↵Adam Kocoloski
rnewson, bitdiddle git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@813051 13f79535-47bb-0310-9956-ffa450edef68
2009-09-02skip some regex etc. if DB is already openAdam Kocoloski
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@810729 13f79535-47bb-0310-9956-ffa450edef68
2009-08-30refactor CouchDB startup procedure, see COUCHDB-216 for detailsAdam Kocoloski
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@809392 13f79535-47bb-0310-9956-ffa450edef68
2009-08-15replace regexp with re. Thanks Kim Shrier, Gordon Stratton. Closes COUCHDB-245Adam Kocoloski
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@804428 13f79535-47bb-0310-9956-ffa450edef68
2009-07-23use spawn to avoid recursive gen_server callsAdam Kocoloski
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@797092 13f79535-47bb-0310-9956-ffa450edef68
2009-07-23Fixes error on first boot after adding an admin.Paul Joseph Davis
hash_admin_passwords() was being called after registering a config callback which caused couch_server to die when first booting. Just placed the first call before registering the callback. Thanks Bob Dionne. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@797055 13f79535-47bb-0310-9956-ffa450edef68
2009-07-14wheeeeeeeeNoah Slater
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@794057 13f79535-47bb-0310-9956-ffa450edef68
2009-07-06trimmed trailing whitespaceNoah Slater
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@791350 13f79535-47bb-0310-9956-ffa450edef68
2009-05-18remove leftover .compact files on DB deleteAdam Kocoloski
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@775785 13f79535-47bb-0310-9956-ffa450edef68
2009-05-06First cut at _changes api. Update the by_id and by_seq indexes to contain ↵Damien F. Katz
update seq numbers and pointers to bodies on disk, for use in the _changes api. This is a new file version, but the code can continue to serve the old 0.9 version without problems, though certain features in the _changes api will not be able to work. Upgrade to new file version (from 1 to 2) by compacting the file. Also fixed bugs with how the stats api tracks open databases. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@772406 13f79535-47bb-0310-9956-ffa450edef68
2009-04-10Fixes for leaked file handles, with test.Damien F. Katz
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@763858 13f79535-47bb-0310-9956-ffa450edef68
2009-02-25add js test suite for stats, enable access for a previously internal metricJan Lehnardt
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@747852 13f79535-47bb-0310-9956-ffa450edef68
2009-02-22Add runtime statistics -- without EUnit tests for now.Jan Lehnardt
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@746691 13f79535-47bb-0310-9956-ffa450edef68
2009-02-17Put file ref_counting into it's own module, to make the speed of opening an ↵Damien F. Katz
already open database faster (by not waiting on file pending operations, particularly fsync). git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@745076 13f79535-47bb-0310-9956-ffa450edef68
2009-01-19tests for fix to COUCHDB-215, and changing of how max_dbs_open setting is ↵Damien F. Katz
handled at runtime. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@735875 13f79535-47bb-0310-9956-ffa450edef68
2009-01-19Fix for COUCHDB-215, we weren't properly converting a config setting to an ↵Damien F. Katz
integer. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@735817 13f79535-47bb-0310-9956-ffa450edef68
2008-12-22Fix for leaked file handles when not explicitly closed, added file stats ↵Damien F. Katz
code for checking for leaked file handles, and some refactoring of the view api. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@728764 13f79535-47bb-0310-9956-ffa450edef68
2008-12-18fix for crash of couch_server when database non-existantDamien F. Katz
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@727832 13f79535-47bb-0310-9956-ffa450edef68
2008-12-18Fixed problem when a crashed db can cause couch_server to crash when it ↵Damien F. Katz
attempts to interact with it. Moved the interaction from couch_server into the caller's process. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@727811 13f79535-47bb-0310-9956-ffa450edef68
2008-12-10view group state gen_server. thanks damien and davisp.John Christopher Anderson
git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@724946 13f79535-47bb-0310-9956-ffa450edef68
2008-11-20Nearly completed security/validation work. Still needs replication testing.Damien F. Katz
git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@719160 13f79535-47bb-0310-9956-ffa450edef68
2008-11-17More security and validation work. Still incomplete.Damien F. Katz
git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@718311 13f79535-47bb-0310-9956-ffa450edef68
2008-11-11Check in of initial validation and authorization work. This work is ↵Damien F. Katz
incomplete, as there is not yet any way of restricting who can update the design docs. git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@713132 13f79535-47bb-0310-9956-ffa450edef68
2008-10-22Send a notification when a database is createdJan Lehnardt
git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@707076 13f79535-47bb-0310-9956-ffa450edef68
2008-10-22First check-in of admin http authentication and authorization.Damien F. Katz
git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@706848 13f79535-47bb-0310-9956-ffa450edef68
2008-10-02HTTPd refactoring. Moved most code out of couch_httpd into associated ↵Damien F. Katz
modules (couch_httpd_view, couch_httpd_db, couch_httpd_misc_handlers). Also a fix to removed previous doc_by_seq index entries on compaction retry. git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@701173 13f79535-47bb-0310-9956-ffa450edef68
2008-09-13Changes and refactorings to couch_configDamien F. Katz
git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@694989 13f79535-47bb-0310-9956-ffa450edef68
2008-08-31Merged json_term_changes branch back into trunk.Christopher Lenz
git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@690668 13f79535-47bb-0310-9956-ffa450edef68
2008-08-30- Rename configuration options and sections to allow for a nicer .ini file ↵Jan Lehnardt
and HTTP API calls. - Enable .ini parser to read variable assignments with spaces around the '='-sign. - Remove inadequate comment. git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@690513 13f79535-47bb-0310-9956-ffa450edef68
2008-08-22Fix for couch_server process crash when databases that don't exist are ↵Damien F. Katz
attempted to be opened. Removed old comments and fixed the AllowRemoteRestart testing option. git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@688129 13f79535-47bb-0310-9956-ffa450edef68
2008-08-20Merge runtimeconfig branch back into trunkJan Lehnardt
git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@687336 13f79535-47bb-0310-9956-ffa450edef68
2008-08-05Readded file name checks for open and delete, as an attacker could use ↵Damien F. Katz
relative file names to open/delete otherwise inaccessible db files. Also changed view server shutdown when the parent db shutdowns into a non-normal termination, so that the linked supservisor correctly removes the process from its indexes. git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@682790 13f79535-47bb-0310-9956-ffa450edef68
2008-08-05Added concurrent open db limit and a LRU cache for closing old databases ↵Damien F. Katz
when limit reached (configurable via MaxDbsOpen var in couch.ini). Refactored db update code in couch_db.erl into couch_db_updater.erl. git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@682560 13f79535-47bb-0310-9956-ffa450edef68
2008-03-28Imported trunk.Christopher Lenz
git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@642432 13f79535-47bb-0310-9956-ffa450edef68