<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/couchdb.git/src/rexi, 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>Make the rexi:stream2 interface unacked message limit configurable (#2360)</title>
<updated>2020-01-08T02:10:14+00:00</updated>
<author>
<name>Kyle Snavely</name>
<email>kjsnavely@gmail.com</email>
</author>
<published>2020-01-08T02:10:14+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=08d6538a27a23d118579b438cc54daf86be3d5b4'/>
<id>08d6538a27a23d118579b438cc54daf86be3d5b4</id>
<content type='text'>
Also lower the default stream_limit to 5 based on the results of
performance testing.

Co-authored-by: Adam Kocoloski &lt;kocolosk@apache.org&gt;
Co-authored-by: Kyle Snavely &lt;kjsnavely@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also lower the default stream_limit to 5 based on the results of
performance testing.

Co-authored-by: Adam Kocoloski &lt;kocolosk@apache.org&gt;
Co-authored-by: Kyle Snavely &lt;kjsnavely@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Use individual rexi kill messages by default</title>
<updated>2019-05-01T17:30:42+00:00</updated>
<author>
<name>Nick Vatamaniuc</name>
<email>vatamane@apache.org</email>
</author>
<published>2019-05-01T14:05:44+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=762d7a81416d07ab2f9a7f7091376376075578c0'/>
<id>762d7a81416d07ab2f9a7f7091376376075578c0</id>
<content type='text'>
When performing a rolling upgrade older nodes won't be able to handle newer
kill_all messages. In busy clusters this could cause couch_server and other
message queue backups while the upgrade is in progress.

Make message sending behavior is configurable. After all the nodes have been
upgraded, can toggle `[rexi] use_kill_all = true` to save on some inter-node
network traffic. In a future release the configuration check might be removed,
default to sending kill_all messages only.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When performing a rolling upgrade older nodes won't be able to handle newer
kill_all messages. In busy clusters this could cause couch_server and other
message queue backups while the upgrade is in progress.

Make message sending behavior is configurable. After all the nodes have been
upgraded, can toggle `[rexi] use_kill_all = true` to save on some inter-node
network traffic. In a future release the configuration check might be removed,
default to sending kill_all messages only.
</pre>
</div>
</content>
</entry>
<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>Remove explicit modules list from .app.src files</title>
<updated>2018-12-28T00:34:36+00:00</updated>
<author>
<name>Jay Doane</name>
<email>jay.s.doane@gmail.com</email>
</author>
<published>2018-12-23T09:12:55+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=7be0ab849d57303b93b8cc1d92ce2a23be3c702f'/>
<id>7be0ab849d57303b93b8cc1d92ce2a23be3c702f</id>
<content type='text'>
The modules lists in .app files are automatically generated by rebar
from .app.src files, so these explicit lists are unnecessary and prone
to being out of date.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The modules lists in .app files are automatically generated by rebar
from .app.src files, so these explicit lists are unnecessary and prone
to being out of date.
</pre>
</div>
</content>
</entry>
<entry>
<title>Make sure to start per-node rexi servers right away</title>
<updated>2018-10-02T16:15:17+00:00</updated>
<author>
<name>Nick Vatamaniuc</name>
<email>vatamane@apache.org</email>
</author>
<published>2018-09-26T17:08:45+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=abb2a86545d311884fe3256a30c4f7d75e0b26ef'/>
<id>abb2a86545d311884fe3256a30c4f7d75e0b26ef</id>
<content type='text'>
This ensures they will be ready to process requests as soon as the application
starts up. This should make the service available sooner and should help tests
which setup and tear down the services repeatedly, where it would avoid an
annoying retry-until-ready loop.

Per-node servers/buffers are started in the init method of the monitors. There
is not chance of deadlock there because per-node supervisors are started before
the monitors.

Issue #1625
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This ensures they will be ready to process requests as soon as the application
starts up. This should make the service available sooner and should help tests
which setup and tear down the services repeatedly, where it would avoid an
annoying retry-until-ready loop.

Per-node servers/buffers are started in the init method of the monitors. There
is not chance of deadlock there because per-node supervisors are started before
the monitors.

Issue #1625
</pre>
</div>
</content>
</entry>
<entry>
<title>Switch rexi server_per_node to true by default</title>
<updated>2018-10-02T16:15:17+00:00</updated>
<author>
<name>Nick Vatamaniuc</name>
<email>vatamane@apache.org</email>
</author>
<published>2018-09-26T14:00:27+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=b3549149f1a871974cff3c9a260c217eb57ec849'/>
<id>b3549149f1a871974cff3c9a260c217eb57ec849</id>
<content type='text'>
This has been solid for years and when not enabled can be a performance
bottleneck.

Fixes #1625
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This has been solid for years and when not enabled can be a performance
bottleneck.

Fixes #1625
</pre>
</div>
</content>
</entry>
<entry>
<title>Allow disabling off-heap messages</title>
<updated>2018-09-06T22:27:40+00:00</updated>
<author>
<name>Nick Vatamaniuc</name>
<email>vatamane@apache.org</email>
</author>
<published>2018-09-06T21:31:34+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=ee3c4b5d2e58e35a11e6995d47580554a7d7aca8'/>
<id>ee3c4b5d2e58e35a11e6995d47580554a7d7aca8</id>
<content type='text'>
Off-heap messages is an Erlang 19 feature:

http://erlang.org/doc/man/erlang.html#process_flag_message_queue_data

It is adviseable to use that setting for processes which expect to receive a
lot of messages. CouchDB sets it for couch_server, couch_log_server and bunch
of others as well.

In some cases the off-heap behavior could alter the timing of message receives
and expose subtle bugs that have been lurking in the code for years. Or could
slightly reduce performance, so a safety measure allow disabling it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Off-heap messages is an Erlang 19 feature:

http://erlang.org/doc/man/erlang.html#process_flag_message_queue_data

It is adviseable to use that setting for processes which expect to receive a
lot of messages. CouchDB sets it for couch_server, couch_log_server and bunch
of others as well.

In some cases the off-heap behavior could alter the timing of message receives
and expose subtle bugs that have been lurking in the code for years. Or could
slightly reduce performance, so a safety measure allow disabling it.
</pre>
</div>
</content>
</entry>
<entry>
<title>Switch rexi_sup restart strategy to rest_for_one</title>
<updated>2018-08-22T17:49:57+00:00</updated>
<author>
<name>Nick Vatamaniuc</name>
<email>vatamane@apache.org</email>
</author>
<published>2018-08-21T22:35:28+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=2350cd4e0602a3ef4d0fa79096294e558ddaf475'/>
<id>2350cd4e0602a3ef4d0fa79096294e558ddaf475</id>
<content type='text'>
Previously, as described in issue #1571, `rexi_server_sup` supervisor could die
and restart. After it restarts `rexi_server_mon` would not respan rexi servers
as it wouldn't notice `rexi_server_sup` went away and come back. That would
leave the cluster in a disabled state.

To fix the issue, switch restart strategy to `rest_for_one`. In this case, if a
child at the top dies it will restart all the children below it in the list.
For example, if `rexi_server` dies, it will restart all the children. If
`rexi_server_sup` dies, it will restart `rexi_server_mon`. And then on restart
`rexi_server_mon` will properly spawn all the rexi servers.

Same for the buffers, if `rexi_buffer_sup` dies, it will restart `rexi_buffer_mon`
and on restart it will spawn buffers as expected.

Fixes: #1571
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, as described in issue #1571, `rexi_server_sup` supervisor could die
and restart. After it restarts `rexi_server_mon` would not respan rexi servers
as it wouldn't notice `rexi_server_sup` went away and come back. That would
leave the cluster in a disabled state.

To fix the issue, switch restart strategy to `rest_for_one`. In this case, if a
child at the top dies it will restart all the children below it in the list.
For example, if `rexi_server` dies, it will restart all the children. If
`rexi_server_sup` dies, it will restart `rexi_server_mon`. And then on restart
`rexi_server_mon` will properly spawn all the rexi servers.

Same for the buffers, if `rexi_buffer_sup` dies, it will restart `rexi_buffer_mon`
and on restart it will spawn buffers as expected.

Fixes: #1571
</pre>
</div>
</content>
</entry>
<entry>
<title>Add rexi ping message</title>
<updated>2018-08-08T17:24:38+00:00</updated>
<author>
<name>Garren Smith</name>
<email>garren.smith@gmail.com</email>
</author>
<published>2018-08-08T07:53:47+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=a7f2aa5175c8fad8f946c3d2ff79558b74b8ee18'/>
<id>a7f2aa5175c8fad8f946c3d2ff79558b74b8ee18</id>
<content type='text'>
Add a ping message to rexi to avoid any long running operations from
timing out. Long running operations at the node level can exceed the
fabric timeout and be cancelled. Sending a ping message back will
stop that from happening.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a ping message to rexi to avoid any long running operations from
timing out. Long running operations at the node level can exceed the
fabric timeout and be cancelled. Sending a ping message back will
stop that from happening.
</pre>
</div>
</content>
</entry>
<entry>
<title>Call `set_mqd_off_heap` for critical processes</title>
<updated>2018-06-19T14:28:14+00:00</updated>
<author>
<name>Paul J. Davis</name>
<email>paul.joseph.davis@gmail.com</email>
</author>
<published>2018-06-18T17:39:30+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=a13efba0d61c52b11e555915742de7b3ae1b75e6'/>
<id>a13efba0d61c52b11e555915742de7b3ae1b75e6</id>
<content type='text'>
This uses the new `couch_util:set_mqd_off_heap/0` function to set
message queues to off_heap for some of our critical processes that
receive a significant amount of load in terms of message volume.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This uses the new `couch_util:set_mqd_off_heap/0` function to set
message queues to off_heap for some of our critical processes that
receive a significant amount of load in terms of message volume.
</pre>
</div>
</content>
</entry>
</feed>
