summaryrefslogtreecommitdiff
path: root/src/couchdb/couch_rep.erl
AgeCommit message (Collapse)Author
2010-11-16Replicator: use the new builtin _doc_ids filter for the by doc IDs replication.Filipe David Borba Manana
This reduces code complexity and allows for continuous by doc IDs replication. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1035780 13f79535-47bb-0310-9956-ffa450edef68
2010-11-04Replicator: set Content-Length header when posting to _ensure_full_commit. ↵Filipe David Borba Manana
Same reason as for COUCHDB-932. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1031276 13f79535-47bb-0310-9956-ffa450edef68
2010-10-20checkpoints reuse session_id. Patch by tilgovi. COUCHDB-704Adam Kocoloski
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1025573 13f79535-47bb-0310-9956-ffa450edef68
2010-10-16Replicator: fix issues when a peer is accessible via SSL.Filipe David Borba Manana
Closes COUCHDB-491. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1023274 13f79535-47bb-0310-9956-ffa450edef68
2010-09-30Removing ?getv macros.Filipe David Borba Manana
With OTP releases up to R13B03 it's not possible to define a 2 macro functions with the same name and different arities. (Only allowed in R13B04 and R14). git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1003025 13f79535-47bb-0310-9956-ffa450edef68
2010-09-29Add missing expression to close the database (COUCHDB-892 related).Filipe David Borba Manana
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1002810 13f79535-47bb-0310-9956-ffa450edef68
2010-09-28Replicator fix: for a filtered replication, the replication ID should take ↵Filipe David Borba Manana
into account the filter function's code and not only its name. Closes COUCHDB-892. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1002259 13f79535-47bb-0310-9956-ffa450edef68
2010-09-27Replacing calls to couch_util:get_value with ?getvFilipe David Borba Manana
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1001879 13f79535-47bb-0310-9956-ffa450edef68
2010-09-22Replicator: avoid percent encoding the slashes of design and local document IDs.Filipe David Borba Manana
This avoids receiving and following redirect responses from the peer. It also removes the eventual need of special rules in proxies (like Apache httpd). git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1000140 13f79535-47bb-0310-9956-ffa450edef68
2010-09-13Replicator changes:Filipe David Borba Manana
1) avoid badmatch exceptions when there's a failure opening a single document from a remote source; 2) add error log messages describing which remote documents couldn't be opened and why; 3) when replications errors can't be encoded as json, convert and send them as json strings git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@996492 13f79535-47bb-0310-9956-ffa450edef68
2010-08-04Add replicator DB (_replicator).Filipe David Borba Manana
Part of ticket COUCHDB-776. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@982330 13f79535-47bb-0310-9956-ffa450edef68
2010-08-01Add missing clause to the case expression to avoid a case_clause Erlang ↵Filipe David Borba Manana
exception. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@981343 13f79535-47bb-0310-9956-ffa450edef68
2010-07-30Add support for replication through an HTTP/HTTPS proxy.John Christopher Anderson
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@980985 13f79535-47bb-0310-9956-ffa450edef68
2010-07-23Corrected misleading parameter name (Logs => DbList) and removed unnecessary ↵Filipe David Borba Manana
tuple parameter extraction and reconstruction. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@967262 13f79535-47bb-0310-9956-ffa450edef68
2010-07-23Removed bogus log error message.Filipe David Borba Manana
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@967251 13f79535-47bb-0310-9956-ffa450edef68
2010-07-20require application/json content-type in the remaining places where a POST ↵John Christopher Anderson
has side-effects git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@965700 13f79535-47bb-0310-9956-ffa450edef68
2010-07-19remove unguarded atom creation to prevent DOS attacks. closes COUCHDB-829John Christopher Anderson
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@965667 13f79535-47bb-0310-9956-ffa450edef68
2010-07-19COUCHDB-810: Adds port to replication checkpoints.Robert Newson
New replication checkpoints now include the port number, which allows for efficient replication between multiple couchdb instances running on the same machine. Old replication checkpoints are recognized (Full replication is not induced) and they are automatically migrated to the new checkpoint format. Thanks to Randall Leeds for the patch. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@965331 13f79535-47bb-0310-9956-ffa450edef68
2010-06-24use JSON content type in replicator, require it in the _bulk_docs and other ↵John Christopher Anderson
POST apis git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@957422 13f79535-47bb-0310-9956-ffa450edef68
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-19Strip password from URLs before adding them to the tasks databaseJan Lehnardt
and before sending it to the logger. Closes COUCHDB-756. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@946428 13f79535-47bb-0310-9956-ffa450edef68
2010-05-04use crypto:md5 when available. thx fdmanana. Closes COUCHDB-757Adam Kocoloski
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@941033 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-11bugfix for replication keepalive. Closes COUCHDB-730Adam Kocoloski
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@933039 13f79535-47bb-0310-9956-ffa450edef68
2010-03-21Take query options into account when generating replication ids.Jan Lehnardt
Patch by Filipe Manana. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@925879 13f79535-47bb-0310-9956-ffa450edef68
2010-03-20backwards compatible ids for non-docid replicationsJan Lehnardt
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@925497 13f79535-47bb-0310-9956-ffa450edef68
2010-03-19Do not use the doc_id list from the previous replication requestJan Lehnardt
on subsequent replication requests. Closes COUCHDB-703. Patch by Filipe Manana. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@925488 13f79535-47bb-0310-9956-ffa450edef68
2010-02-26fdmananas patch for filtered replication via COUCHDB-673John Christopher Anderson
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@916518 13f79535-47bb-0310-9956-ffa450edef68
2010-02-24replicator and view generator can skip check_is_reader when opening database ↵John Christopher Anderson
files git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@915827 13f79535-47bb-0310-9956-ffa450edef68
2010-02-24Allow replication to be cancelled. Closes COUCHDB-664. Patch by Robert Newson.Jan Lehnardt
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@915664 13f79535-47bb-0310-9956-ffa450edef68
2010-02-19keep listeners when rebooting replicationsAdam Kocoloski
This fixes the problem where rebooted replications would crash at the end with a badmatch on [] in do_terminate. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@911717 13f79535-47bb-0310-9956-ffa450edef68
2010-01-29Thanks Filipe Manana. Closes COUCHDB-631.John Christopher Anderson
Replicator option to replicate a list of docids (bypasses by_seq index). Usage: POST to /_replicate with a JSON body of: {"source": "myfoo", "target" : "http://remotedb.com/theirfoo", "doc_ids": ["foo1", "foo3", "foo666"]} This will copy the listed docs from the source to the target database. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@904615 13f79535-47bb-0310-9956-ffa450edef68
2009-12-08release old Fds on replication reboot, shut down child procs in a cleaner orderAdam Kocoloski
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@888267 13f79535-47bb-0310-9956-ffa450edef68
2009-11-21code improvements from tidier. Patch by Kostis Sagonas. COUCHDB-570Adam Kocoloski
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@882903 13f79535-47bb-0310-9956-ffa450edef68
2009-10-28reboot replication from last checkpoint if DB is compacted or server restartsAdam Kocoloski
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@830737 13f79535-47bb-0310-9956-ffa450edef68
2009-10-20typoJan Lehnardt
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@827720 13f79535-47bb-0310-9956-ffa450edef68
2009-10-15Only check for admin user if we are trying to create a database. Thanks to ↵Jan Lehnardt
Bob Dionne for testing the patch. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@825485 13f79535-47bb-0310-9956-ffa450edef68
2009-10-11add create_target:true option to _replicate that creates the target databaseJan Lehnardt
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@824029 13f79535-47bb-0310-9956-ffa450edef68
2009-09-21attempt at gentler replication shutdown when one of the DBs is deletedAdam Kocoloski
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@817403 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-06check if either history is empty, not bothAdam Kocoloski
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@811868 13f79535-47bb-0310-9956-ffa450edef68
2009-09-05code =~ s/imperative/declarative & faster/, thanks to Kostis Sagonas for ↵Jan Lehnardt
pointing these out, more to come git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@811709 13f79535-47bb-0310-9956-ffa450edef68
2009-09-02fix continuous replication occurring after identical normal oneAdam Kocoloski
Both forms of replication had the same child ID in the replication supervisor. As a result, a continuous replication triggered after an otherwise-identical normal replication would "forget" that it was continuous. The tricky part about this patch is that it lets a normal and a continuous replication with the same source and target execute simultaneously. That's inefficient, but other solutions are convoluted or give surprising results to the client. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@810358 13f79535-47bb-0310-9956-ffa450edef68
2009-08-28fix pattern matching bug in redirects for replicationAdam Kocoloski
if opening the DB returns 301, use the new URL for the rest of the replication git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@808876 13f79535-47bb-0310-9956-ffa450edef68
2009-08-25use _ensure_full_commit?seq=N in replication for efficiencyAdam Kocoloski
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@807461 13f79535-47bb-0310-9956-ffa450edef68
2009-08-24only save a checkpoint at the end if something changedAdam Kocoloski
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@807360 13f79535-47bb-0310-9956-ffa450edef68
2009-08-24checkpoint at most once per 5 secondsAdam Kocoloski
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@807320 13f79535-47bb-0310-9956-ffa450edef68
2009-08-24skip full_commit during replication when its safeAdam Kocoloski
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@807208 13f79535-47bb-0310-9956-ffa450edef68
2009-08-19continuous replication request returns 202 Accepted and the _local docidAdam Kocoloski
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@805643 13f79535-47bb-0310-9956-ffa450edef68
2009-08-15better failure modes in replication. See COUCHDB-193, COUCHDB-416Adam Kocoloski
If you try to replicate a DB to itself, the replication will proceed, but no checkpoints will be saved, and the logs will say "checkpoint failure: conflict (are you replicating to yourself?)" If you try to specify a non-existent DB as source or target, replication will fail immediately with a 404. The response body will indicate which DB could not be opened. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@804436 13f79535-47bb-0310-9956-ffa450edef68