/[Apache-SVN]/couchdb/trunk/src/couchdb/couch_rep.erl
ViewVC logotype

Log of /couchdb/trunk/src/couchdb/couch_rep.erl

Parent Directory Parent Directory | Revision Log Revision Log


Links to HEAD: (view) (annotate)
Sticky Revision:

Revision 882903 - (view) (annotate) - [select for diffs]
Modified Sat Nov 21 13:43:43 2009 UTC (5 days, 5 hours ago) by kocolosk
File length: 22887 byte(s)
Diff to previous 830737 (colored)
code improvements from tidier. Patch by Kostis Sagonas. COUCHDB-570

Revision 830737 - (view) (annotate) - [select for diffs]
Modified Wed Oct 28 19:27:31 2009 UTC (4 weeks, 1 day ago) by kocolosk
File length: 22884 byte(s)
Diff to previous 827720 (colored)
reboot replication from last checkpoint if DB is compacted or server restarts

Revision 827720 - (view) (annotate) - [select for diffs]
Modified Tue Oct 20 16:15:32 2009 UTC (5 weeks, 2 days ago) by jan
File length: 22295 byte(s)
Diff to previous 825485 (colored)
typo

Revision 825485 - (view) (annotate) - [select for diffs]
Modified Thu Oct 15 12:55:48 2009 UTC (6 weeks ago) by jan
File length: 22296 byte(s)
Diff to previous 824029 (colored)
Only check for admin user if we are trying to create a database. Thanks to Bob Dionne for testing the patch.

Revision 824029 - (view) (annotate) - [select for diffs]
Modified Sun Oct 11 05:49:19 2009 UTC (6 weeks, 4 days ago) by jan
File length: 22283 byte(s)
Diff to previous 817403 (colored)
add create_target:true option to _replicate that creates the target database

Revision 817403 - (view) (annotate) - [select for diffs]
Modified Mon Sep 21 20:29:22 2009 UTC (2 months ago) by kocolosk
File length: 21584 byte(s)
Diff to previous 813051 (colored)
attempt at gentler replication shutdown when one of the DBs is deleted

Revision 813051 - (view) (annotate) - [select for diffs]
Modified Wed Sep 9 16:53:49 2009 UTC (2 months, 2 weeks ago) by kocolosk
File length: 20857 byte(s)
Diff to previous 811868 (colored)
choice of uuid algos for better insert perf. Closes COUCHDB-465.  Thanks rnewson, bitdiddle

Revision 811868 - (view) (annotate) - [select for diffs]
Modified Sun Sep 6 19:30:23 2009 UTC (2 months, 2 weeks ago) by kocolosk
File length: 20858 byte(s)
Diff to previous 811709 (colored)
check if either history is empty, not both

Revision 811709 - (view) (annotate) - [select for diffs]
Modified Sat Sep 5 20:37:45 2009 UTC (2 months, 3 weeks ago) by jan
File length: 20830 byte(s)
Diff to previous 810358 (colored)
code =~ s/imperative/declarative & faster/, thanks to Kostis Sagonas for pointing these out, more to come

Revision 810358 - (view) (annotate) - [select for diffs]
Modified Wed Sep 2 04:48:36 2009 UTC (2 months, 3 weeks ago) by kocolosk
File length: 20872 byte(s)
Diff to previous 808876 (colored)
fix continuous replication occurring after identical normal one

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.

Revision 808876 - (view) (annotate) - [select for diffs]
Modified Fri Aug 28 13:05:48 2009 UTC (2 months, 4 weeks ago) by kocolosk
File length: 20668 byte(s)
Diff to previous 807461 (colored)
fix pattern matching bug in redirects for replication

if opening the DB returns 301, use the new URL for the rest of the replication

Revision 807461 - (view) (annotate) - [select for diffs]
Modified Tue Aug 25 03:03:23 2009 UTC (3 months ago) by kocolosk
File length: 20746 byte(s)
Diff to previous 807360 (colored)
use _ensure_full_commit?seq=N in replication for efficiency

Revision 807360 - (view) (annotate) - [select for diffs]
Modified Mon Aug 24 20:10:19 2009 UTC (3 months ago) by kocolosk
File length: 19846 byte(s)
Diff to previous 807320 (colored)
only save a checkpoint at the end if something changed

Revision 807320 - (view) (annotate) - [select for diffs]
Modified Mon Aug 24 17:57:51 2009 UTC (3 months ago) by kocolosk
File length: 19660 byte(s)
Diff to previous 807208 (colored)
checkpoint at most once per 5 seconds

Revision 807208 - (view) (annotate) - [select for diffs]
Modified Mon Aug 24 13:31:48 2009 UTC (3 months ago) by kocolosk
File length: 18935 byte(s)
Diff to previous 805643 (colored)
skip full_commit during replication when its safe

Revision 805643 - (view) (annotate) - [select for diffs]
Modified Wed Aug 19 00:51:19 2009 UTC (3 months, 1 week ago) by kocolosk
File length: 18356 byte(s)
Diff to previous 804436 (colored)
continuous replication request returns 202 Accepted and the _local docid

Revision 804436 - (view) (annotate) - [select for diffs]
Modified Sat Aug 15 05:11:45 2009 UTC (3 months, 1 week ago) by kocolosk
File length: 18121 byte(s)
Diff to previous 802888 (colored)
better failure modes in replication.  See COUCHDB-193, COUCHDB-416

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.

Revision 802888 - (view) (annotate) - [select for diffs]
Modified Mon Aug 10 18:37:43 2009 UTC (3 months, 2 weeks ago) by kocolosk
File length: 17896 byte(s)
Diff to previous 802145 (colored)
new replicator using _changes feed for continuous replication

Revision 802145 - (view) (annotate) - [select for diffs]
Modified Fri Aug 7 19:12:39 2009 UTC (3 months, 2 weeks ago) by kocolosk
File length: 34610 byte(s)
Diff to previous 800938 (colored)
ibrowse wrapper for replicator, will replace do_http_request

Revision 800938 - (view) (annotate) - [select for diffs]
Modified Tue Aug 4 19:50:46 2009 UTC (3 months, 3 weeks ago) by damien
File length: 34558 byte(s)
Diff to previous 800883 (colored)
Initial check-in of OAuth and cookie authentication.

Revision 800883 - (view) (annotate) - [select for diffs]
Modified Tue Aug 4 17:25:17 2009 UTC (3 months, 3 weeks ago) by jan
File length: 33432 byte(s)
Diff to previous 795232 (colored)
encode slashes in db names in Location response header after database creation, move couch_rep:url_encode/1 to couch_util:url_encode/1, closes COUCHDB-411

Revision 795232 - (view) (annotate) - [select for diffs]
Modified Fri Jul 17 21:33:41 2009 UTC (4 months, 1 week ago) by damien
File length: 33936 byte(s)
Diff to previous 794057 (colored)
Deterministic revids, MD5 checking of documents, added tracking of rev when an attachment is edited to allow attachment level replication.

Revision 794057 - (view) (annotate) - [select for diffs]
Modified Tue Jul 14 20:21:39 2009 UTC (4 months, 1 week ago) by nslater
File length: 34070 byte(s)
Diff to previous 791350 (colored)
wheeeeeeee

Revision 791350 - (view) (annotate) - [select for diffs]
Modified Mon Jul 6 00:33:50 2009 UTC (4 months, 3 weeks ago) by nslater
File length: 34072 byte(s)
Diff to previous 782038 (colored)
trimmed trailing whitespace

Revision 782038 - (view) (annotate) - [select for diffs]
Modified Fri Jun 5 15:11:45 2009 UTC (5 months, 3 weeks ago) by kocolosk
File length: 34409 byte(s)
Diff to previous 779846 (colored)
checkpoint during abnormal terminate is not safe

Revision 779846 - (view) (annotate) - [select for diffs]
Modified Fri May 29 05:31:01 2009 UTC (5 months, 4 weeks ago) by kocolosk
File length: 34483 byte(s)
Diff to previous 779842 (colored)
make sure process is still alive before calculating memory footprint

Revision 779842 - (view) (annotate) - [select for diffs]
Modified Fri May 29 05:07:24 2009 UTC (5 months, 4 weeks ago) by kocolosk
File length: 34292 byte(s)
Diff to previous 776031 (colored)
the atom doesn't necessarily exist

Revision 776031 - (view) (annotate) - [select for diffs]
Modified Mon May 18 18:11:09 2009 UTC (6 months, 1 week ago) by kocolosk
File length: 34301 byte(s)
Diff to previous 775720 (colored)
first crack at binary backoff for failed replicator requests

Revision 775720 - (view) (annotate) - [select for diffs]
Modified Sun May 17 17:24:13 2009 UTC (6 months, 1 week ago) by kocolosk
File length: 33377 byte(s)
Diff to previous 775715 (colored)
guard memory_footprint() list with is_pid()

Revision 775715 - (view) (annotate) - [select for diffs]
Modified Sun May 17 17:05:21 2009 UTC (6 months, 1 week ago) by kocolosk
File length: 33345 byte(s)
Diff to previous 775685 (colored)
one more hanging receive loop fix

Revision 775685 - (view) (annotate) - [select for diffs]
Modified Sun May 17 16:02:39 2009 UTC (6 months, 1 week ago) by kocolosk
File length: 33186 byte(s)
Diff to previous 775680 (colored)
replicator should never hang when attachment receiver dies

Revision 775680 - (view) (annotate) - [select for diffs]
Modified Sun May 17 15:54:40 2009 UTC (6 months, 1 week ago) by kocolosk
File length: 32374 byte(s)
Diff to previous 775507 (colored)
cleaner, more informative replicator log messages

Revision 775507 - (view) (annotate) - [select for diffs]
Modified Sat May 16 18:58:18 2009 UTC (6 months, 1 week ago) by kocolosk
File length: 32099 byte(s)
Diff to previous 772415 (colored)
replicator memory management and buffer flush calculation updates

* new should_flush fun considers ndocs, nattachments, memory in making decision
* memory utilized by attachment receivers is accounted for
* download attachments using standalone connections instead of conn pool.  This
  prevents a document request from getting stuck behind a huge attachment, which
  would prevent us from triggering a buffer flush in time.  We also consider the
  memory utilization of the standalone ibrowse connection in should_flush

Revision 772415 - (view) (annotate) - [select for diffs]
Modified Wed May 6 20:26:43 2009 UTC (6 months, 3 weeks ago) by damien
File length: 29966 byte(s)
Diff to previous 772406 (colored)
Removing leftover io:format call from debugging.

Revision 772406 - (view) (annotate) - [select for diffs]
Modified Wed May 6 19:11:10 2009 UTC (6 months, 3 weeks ago) by damien
File length: 30012 byte(s)
Diff to previous 771480 (colored)
First cut at _changes api. Update the by_id and by_seq indexes to contain 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.

Revision 771480 - (view) (annotate) - [select for diffs]
Modified Mon May 4 22:36:46 2009 UTC (6 months, 3 weeks ago) by kocolosk
File length: 30029 byte(s)
Diff to previous 765364 (colored)
use revisions when replicating attachments.  Closes COUCHDB-337

Revision 765364 - (view) (annotate) - [select for diffs]
Modified Wed Apr 15 21:21:23 2009 UTC (7 months, 1 week ago) by kocolosk
File length: 29940 byte(s)
Diff to previous 760533 (colored)
URL-encode attachment paths during replication

Revision 760533 - (view) (annotate) - [select for diffs]
Modified Tue Mar 31 17:31:20 2009 UTC (7 months, 3 weeks ago) by jan
File length: 29928 byte(s)
Diff to previous 755016 (colored)
unify including of couch_db.hrl

Revision 755016 - (view) (annotate) - [select for diffs]
Modified Mon Mar 16 22:04:08 2009 UTC (8 months, 1 week ago) by damien
File length: 29932 byte(s)
Diff to previous 755009 (colored)
Adding the necessary done=true to the last race condition fix in the replicator. Thanks Adam.

Revision 755009 - (view) (annotate) - [select for diffs]
Modified Mon Mar 16 21:26:47 2009 UTC (8 months, 1 week ago) by damien
File length: 29922 byte(s)
Diff to previous 754704 (colored)
Fix for occasional replication failure where replication would complete before before the caller had a chance to request the results. No tests, but this should fix this error that already occurs occasionally: {"error":"normal","reason":"{gen_server,call,[<0.228.0>,get_result,infinity]}"}

Revision 754704 - (view) (annotate) - [select for diffs]
Modified Sun Mar 15 17:47:29 2009 UTC (8 months, 1 week ago) by jchris
File length: 29677 byte(s)
Diff to previous 753448 (colored)
Streaming attachment replication now follows redirects and checks for error codes. Includes tests that design doc attachments are replicated.

Revision 753448 - (view) (annotate) - [select for diffs]
Modified Fri Mar 13 22:15:34 2009 UTC (8 months, 2 weeks ago) by jchris
File length: 26668 byte(s)
Diff to previous 751491 (colored)
Commit Damien's rep_security branch to trunk. 
Changes bulk_docs conflict checking. 
Breaks file format, see mailing list for data upgrade procedure, or
http://wiki.apache.org/couchdb/Breaking_changes

Revision 751491 - (view) (annotate) - [select for diffs]
Modified Sun Mar 8 18:18:08 2009 UTC (8 months, 2 weeks ago) by kocolosk
File length: 25102 byte(s)
Diff to previous 751305 (colored)
beefier fault tolerance in the replicator

- trap exits (enumerator and attachment streamers are linked)
- retry by respawning enumerator with last known good source seq
- checkpoint replication record on every flush of document buffer
- reformat nicer error messages to listeners if we need to exit

Revision 751305 - (view) (annotate) - [select for diffs]
Modified Sat Mar 7 18:48:47 2009 UTC (8 months, 2 weeks ago) by kocolosk
File length: 23081 byte(s)
Diff to previous 744193 (colored)
rewrite replicator using OTP behaviours

- only one instance of given source->target runs at a time
- supervisor restarts replications that terminate abnormally
- pull repl. streams attachments directly to disk
- improved memory utilization
- temporarily rollback parallel async doc GETs during pull rep.
- replication updates show up in Futon Status window

Revision 744193 - (view) (annotate) - [select for diffs]
Modified Fri Feb 13 17:58:03 2009 UTC (9 months, 1 week ago) by jchris
File length: 18170 byte(s)
Diff to previous 743801 (colored)
fix COUCHDB-253. Replicator should not use chunked transfer-encoding on GET requests. thanks Adam Kocoloski

Revision 743801 - (view) (annotate) - [select for diffs]
Modified Thu Feb 12 16:48:01 2009 UTC (9 months, 1 week ago) by damien
File length: 18119 byte(s)
Diff to previous 739047 (colored)
Fix for spurious 'server restarted' during replication

Revision 739047 - (view) (annotate) - [select for diffs]
Modified Thu Jan 29 22:15:48 2009 UTC (9 months, 3 weeks ago) by jchris
File length: 17984 byte(s)
Diff to previous 733174 (colored)
Replacement of inets with ibrowse. Fixes COUCHDB-179 and enhances replication.
Thanks Jason Davies and Adam Kocoloski for the fix, Maximillian Dornseif for reporting.

Revision 733174 - (view) (annotate) - [select for diffs]
Modified Fri Jan 9 22:20:48 2009 UTC (10 months, 2 weeks ago) by damien
File length: 16546 byte(s)
Diff to previous 731159 (colored)
Added support so clients can detect if a server has potentially lost commits after multiple updates, like during bulk imports and so the replicator can detect lost commits on remote replications.

Revision 731159 - (view) (annotate) - [select for diffs]
Modified Sun Jan 4 02:28:08 2009 UTC (10 months, 3 weeks ago) by jchris
File length: 14989 byte(s)
Diff to previous 727182 (colored)
change count to limit in view query params

Revision 727182 - (view) (annotate) - [select for diffs]
Modified Tue Dec 16 21:55:37 2008 UTC (11 months, 1 week ago) by jchris
File length: 14989 byte(s)
Diff to previous 727171 (colored)
fix COUCHDB-174 thanks Adam Kocoloski

Revision 727171 - (view) (annotate) - [select for diffs]
Modified Tue Dec 16 21:48:41 2008 UTC (11 months, 1 week ago) by jchris
File length: 14197 byte(s)
Diff to previous 726143 (colored)
Adam Kocoloski replication performance improvements (closes COUCHDB-160)

Revision 726143 - (view) (annotate) - [select for diffs]
Modified Fri Dec 12 22:32:42 2008 UTC (11 months, 2 weeks ago) by joes
File length: 12625 byte(s)
Diff to previous 719160 (colored)
move couchdb to tlp

Revision 719160 - (view) (annotate) - [select for diffs]
Modified Thu Nov 20 04:42:43 2008 UTC (12 months ago) by damien
Original Path: incubator/couchdb/trunk/src/couchdb/couch_rep.erl
File length: 12625 byte(s)
Diff to previous 718311 (colored)
Nearly completed security/validation work. Still needs replication testing.

Revision 718311 - (view) (annotate) - [select for diffs]
Modified Mon Nov 17 18:18:51 2008 UTC (12 months, 1 week ago) by damien
Original Path: incubator/couchdb/trunk/src/couchdb/couch_rep.erl
File length: 12638 byte(s)
Diff to previous 713132 (colored)
More security and validation work. Still incomplete.

Revision 713132 - (view) (annotate) - [select for diffs]
Modified Tue Nov 11 19:45:50 2008 UTC (12 months, 2 weeks ago) by damien
Original Path: incubator/couchdb/trunk/src/couchdb/couch_rep.erl
File length: 12106 byte(s)
Diff to previous 712578 (colored)
Check in of initial validation and authorization work. This work is incomplete, as there is not yet any way of restricting who can update the design docs.

Revision 712578 - (view) (annotate) - [select for diffs]
Modified Sun Nov 9 22:39:26 2008 UTC (12 months, 2 weeks ago) by jchris
Original Path: incubator/couchdb/trunk/src/couchdb/couch_rep.erl
File length: 12053 byte(s)
Diff to previous 698333 (colored)
apply replication fixing patches from COUCHDB-157

Revision 698333 - (view) (annotate) - [select for diffs]
Modified Tue Sep 23 20:15:27 2008 UTC (14 months ago) by jchris
Original Path: incubator/couchdb/trunk/src/couchdb/couch_rep.erl
File length: 12057 byte(s)
Diff to previous 690668 (colored)
fix for COUCHDB-119 - replication is incremental between local and remote databases

Revision 690668 - (view) (annotate) - [select for diffs]
Modified Sun Aug 31 09:43:41 2008 UTC (14 months, 3 weeks ago) by cmlenz
Original Path: incubator/couchdb/trunk/src/couchdb/couch_rep.erl
File length: 11991 byte(s)
Diff to previous 682560 (colored)
Merged json_term_changes branch back into trunk.

Revision 682560 - (view) (annotate) - [select for diffs]
Modified Tue Aug 5 01:43:40 2008 UTC (15 months, 3 weeks ago) by damien
Original Path: incubator/couchdb/trunk/src/couchdb/couch_rep.erl
File length: 11921 byte(s)
Diff to previous 677892 (colored)
Added concurrent open db limit and a LRU cache for closing old databases when limit reached (configurable via MaxDbsOpen var in couch.ini). Refactored db update code in couch_db.erl into couch_db_updater.erl.

Revision 677892 - (view) (annotate) - [select for diffs]
Modified Fri Jul 18 12:57:07 2008 UTC (16 months, 1 week ago) by damien
Original Path: incubator/couchdb/trunk/src/couchdb/couch_rep.erl
File length: 11592 byte(s)
Diff to previous 677426 (colored)
Fix for problem when saving bulk documents with invalid ids

Revision 677426 - (view) (annotate) - [select for diffs]
Modified Wed Jul 16 20:55:14 2008 UTC (16 months, 1 week ago) by damien
Original Path: incubator/couchdb/trunk/src/couchdb/couch_rep.erl
File length: 11590 byte(s)
Diff to previous 650729 (colored)
Fixed replication problems where read ad write queues can get backed up. With this fixed, throughput might be reduced.

Revision 650729 - (view) (annotate) - [select for diffs]
Modified Wed Apr 23 02:23:02 2008 UTC (19 months ago) by damien
Original Path: incubator/couchdb/trunk/src/couchdb/couch_rep.erl
File length: 11252 byte(s)
Diff to previous 650705 (colored)
Fix for replication being reset when replication a local and a remote database.

Revision 650705 - (view) (annotate) - [select for diffs]
Modified Wed Apr 23 00:25:23 2008 UTC (19 months ago) by damien
Original Path: incubator/couchdb/trunk/src/couchdb/couch_rep.erl
File length: 10763 byte(s)
Diff to previous 649988 (colored)
Replicator optmizations and fix for unnecessary document copy during re-replication

Revision 649988 - (view) (annotate) - [select for diffs]
Modified Sun Apr 20 22:27:11 2008 UTC (19 months ago) by damien
Original Path: incubator/couchdb/trunk/src/couchdb/couch_rep.erl
File length: 9379 byte(s)
Diff to previous 649948 (colored)
Change uuid generaion to rely on crypto. Started crypto and inets application in startscript, and also couch_server_up. Fix for regression caused by accidental check-in of disabled etags.

Revision 649948 - (view) (annotate) - [select for diffs]
Modified Sun Apr 20 18:17:15 2008 UTC (19 months, 1 week ago) by damien
Original Path: incubator/couchdb/trunk/src/couchdb/couch_rep.erl
File length: 9567 byte(s)
Diff to previous 648222 (colored)
Added proper UUID generation and changed the details of how way debug logging is done to now use a more effcient macro instead of a function call.

Revision 648222 - (view) (annotate) - [select for diffs]
Modified Tue Apr 15 12:21:00 2008 UTC (19 months, 1 week ago) by cmlenz
Original Path: incubator/couchdb/trunk/src/couchdb/couch_rep.erl
File length: 9578 byte(s)
Diff to previous 645661 (colored)
Merged mochiweb branch back into trunk.

Revision 645661 - (view) (annotate) - [select for diffs]
Modified Mon Apr 7 19:51:17 2008 UTC (19 months, 2 weeks ago) by damien
Original Path: incubator/couchdb/trunk/src/couchdb/couch_rep.erl
File length: 9389 byte(s)
Diff to previous 642432 (colored)
Compaction. Works, but still needs queueing and better handling for long reads/writes overlapping the compaction switchover.

Revision 642432 - (view) (annotate) - [select for diffs]
Added Fri Mar 28 23:32:19 2008 UTC (19 months, 4 weeks ago) by cmlenz
Original Path: incubator/couchdb/trunk/src/couchdb/couch_rep.erl
File length: 10566 byte(s)
Imported trunk.

This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.

  Diffs between and
  Type of Diff should be a

apache@apache.org
ViewVC Help
Powered by ViewVC 1.1.2