<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/couchdb.git/src/mem3/include, branch decrease-indexer-transaction-time-limit</title>
<subtitle>github.com: apache/couchdb.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/'/>
<entry>
<title>Uneven shard copy handling in mem3 and fabric</title>
<updated>2019-04-03T14:48:45+00:00</updated>
<author>
<name>Nick Vatamaniuc</name>
<email>vatamane@apache.org</email>
</author>
<published>2019-03-18T17:32:14+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=d10b7955929c1581f192fc487840cbf5005f84c9'/>
<id>d10b7955929c1581f192fc487840cbf5005f84c9</id>
<content type='text'>
The introduction of shard splitting will eliminate the contraint that all
document copies are located in shards with same range boundaries. That
assumption was made by default in mem3 and fabric functions that do shard
replacement, worker spawning, unpacking `_changes` update sequences and some
others. This commit updates those places to handle the case where document
copies might be in different shard ranges.

A good place to start from is the `mem3_util:get_ring()` function. This
function returns a full non-overlapped ring from a set of possibly overlapping
shards.

This function is used by almost everything else in this commit:

1) It's used when only a single copy of the data is needed, for example in
cases where _all_docs or _changes procesessig.

2) Used when checking if progress is possible after some nodes died.
`get_ring()` returns `[]` when it cannot find a full ring is used to indicate
that progress is not possible.

3) During shard replacement. This is pershaps the most complicated case. During
replacement besides just finding a possible covering of the ring from the set
of shards, it is also desirable to find one that minimizes the number of
workers that have to be replaced. A neat trick used here is to provide
`get_ring` with a custom sort function, which prioritizes certain shard copies
over others. In case of replacements it prioritiezes shards for which workers
have already spawned. In the default cause `get_ring()` will prioritize longer
ranges over shorter ones, so for example, to cover the interval [00-ff] with
either [00-7f, 80-ff] or [00-ff] shards ranges, it will pick the single [00-ff]
range instead of [00-7f, 80-ff] pair.

Co-authored-by: Paul J. Davis &lt;davisp@apache.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The introduction of shard splitting will eliminate the contraint that all
document copies are located in shards with same range boundaries. That
assumption was made by default in mem3 and fabric functions that do shard
replacement, worker spawning, unpacking `_changes` update sequences and some
others. This commit updates those places to handle the case where document
copies might be in different shard ranges.

A good place to start from is the `mem3_util:get_ring()` function. This
function returns a full non-overlapped ring from a set of possibly overlapping
shards.

This function is used by almost everything else in this commit:

1) It's used when only a single copy of the data is needed, for example in
cases where _all_docs or _changes procesessig.

2) Used when checking if progress is possible after some nodes died.
`get_ring()` returns `[]` when it cannot find a full ring is used to indicate
that progress is not possible.

3) During shard replacement. This is pershaps the most complicated case. During
replacement besides just finding a possible covering of the ring from the set
of shards, it is also desirable to find one that minimizes the number of
workers that have to be replaced. A neat trick used here is to provide
`get_ring` with a custom sort function, which prioritizes certain shard copies
over others. In case of replacements it prioritiezes shards for which workers
have already spawned. In the default cause `get_ring()` will prioritize longer
ranges over shorter ones, so for example, to cover the interval [00-ff] with
either [00-7f, 80-ff] or [00-ff] shards ranges, it will pick the single [00-ff]
range instead of [00-7f, 80-ff] pair.

Co-authored-by: Paul J. Davis &lt;davisp@apache.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix dialyzer warning of shard record construction</title>
<updated>2018-08-28T01:04:26+00:00</updated>
<author>
<name>jiangph</name>
<email>jiangph@cn.ibm.com</email>
</author>
<published>2018-08-27T13:24:47+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=e748d138fb3244e306ca5af88fc0d15b483c48c3'/>
<id>e748d138fb3244e306ca5af88fc0d15b483c48c3</id>
<content type='text'>
   - Fix dialyzer warning that record construction #shard violates
     the declared type in fabric_doc_open_revs.erl,
     cpse_test_purge_replication.erl and other files

Fixes #1580
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
   - Fix dialyzer warning that record construction #shard violates
     the declared type in fabric_doc_open_revs.erl,
     cpse_test_purge_replication.erl and other files

Fixes #1580
</pre>
</div>
</content>
</entry>
<entry>
<title>Implement pluggable storage engines</title>
<updated>2018-02-28T16:32:43+00:00</updated>
<author>
<name>Paul J. Davis</name>
<email>paul.joseph.davis@gmail.com</email>
</author>
<published>2016-02-05T18:04:20+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=f6a771147ba488f80a7d29491263d19088d0eefb'/>
<id>f6a771147ba488f80a7d29491263d19088d0eefb</id>
<content type='text'>
This change moves the main work of storage engines to run through the
new couch_db_engine behavior. This allows us to replace the storage
engine with different implementations that can be tailored to specific
work loads and environments.

COUCHDB-3287
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This change moves the main work of storage engines to run through the
new couch_db_engine behavior. This allows us to replace the storage
engine with different implementations that can be tailored to specific
work loads and environments.

COUCHDB-3287
</pre>
</div>
</content>
</entry>
<entry>
<title>Add 'src/mem3/' from commit 'c3c5429180de14a2b139f7741c934143ef73988c'</title>
<updated>2017-04-01T17:38:53+00:00</updated>
<author>
<name>Jan Lehnardt</name>
<email>jan@apache.org</email>
</author>
<published>2017-04-01T17:38:53+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=81ad7005d01fbc03bd7573aaa97f0b44c137e6c3'/>
<id>81ad7005d01fbc03bd7573aaa97f0b44c137e6c3</id>
<content type='text'>
git-subtree-dir: src/mem3
git-subtree-mainline: 8f39d4191040e7519a573ce1b3cdf5b674bf8e4f
git-subtree-split: c3c5429180de14a2b139f7741c934143ef73988c
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-subtree-dir: src/mem3
git-subtree-mainline: 8f39d4191040e7519a573ce1b3cdf5b674bf8e4f
git-subtree-split: c3c5429180de14a2b139f7741c934143ef73988c
</pre>
</div>
</content>
</entry>
</feed>
