<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/couchdb.git, branch couch-server-improvements-with-deadline</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>Add a deadline for open messages with a timeout</title>
<updated>2018-09-10T19:47:16+00:00</updated>
<author>
<name>Paul J. Davis</name>
<email>paul.joseph.davis@gmail.com</email>
</author>
<published>2018-09-10T19:32:20+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=80076d4ab92f95dc555dcf88897ff458f4916eb3'/>
<id>80076d4ab92f95dc555dcf88897ff458f4916eb3</id>
<content type='text'>
There's no point in performing the work for messages from workers that
have abandoned listening for a request from couch_server. This change
adds a deadline value to each timeout open message. If couch_server sees
one of these after the deadline has passed it will return an error
(although the process may not even be alive any longer) and then
continue handling messages.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There's no point in performing the work for messages from workers that
have abandoned listening for a request from couch_server. This change
adds a deadline value to each timeout open message. If couch_server sees
one of these after the deadline has passed it will return an error
(although the process may not even be alive any longer) and then
continue handling messages.
</pre>
</div>
</content>
</entry>
<entry>
<title>Don't send update_lru messages when disabled</title>
<updated>2018-09-10T19:21:32+00:00</updated>
<author>
<name>Russell Branca</name>
<email>chewbranca@apache.org</email>
</author>
<published>2018-09-04T18:53:56+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=19a390c8ea41bf84d1a38096e622b10eb94daf7c'/>
<id>19a390c8ea41bf84d1a38096e622b10eb94daf7c</id>
<content type='text'>
The couchdb.update_lru_on_read setting controls whether couch_server
uses read requests as LRU update triggers. Unfortunately, the messages
for update_lru on reads are sent regardless of whether this is enabled
or disabled. While in principle this is harmless, and overloaded
couch_server pid can accumulate a considerable volume of these messages,
even when disabled. This patch prevents the caller from sending an
update_lru message when the setting is disabled.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The couchdb.update_lru_on_read setting controls whether couch_server
uses read requests as LRU update triggers. Unfortunately, the messages
for update_lru on reads are sent regardless of whether this is enabled
or disabled. While in principle this is harmless, and overloaded
couch_server pid can accumulate a considerable volume of these messages,
even when disabled. This patch prevents the caller from sending an
update_lru message when the setting is disabled.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add read_concurrency options to couch_server ETS</title>
<updated>2018-09-10T19:21:32+00:00</updated>
<author>
<name>Russell Branca</name>
<email>chewbranca@apache.org</email>
</author>
<published>2018-09-04T18:44:34+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=8c64ee74e051add907889b2c570a955134c3a7f6'/>
<id>8c64ee74e051add907889b2c570a955134c3a7f6</id>
<content type='text'>
This adds the read_concurrency option to couch_server's ETS table for
couch_dbs which contains the references to open database handles. This
is an obvious improvement as all callers opening database pids interact
with this ETS table concurrently. Conversely, the couch_server pid is
the only writer, so no need for write_concurrency.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This adds the read_concurrency option to couch_server's ETS table for
couch_dbs which contains the references to open database handles. This
is an obvious improvement as all callers opening database pids interact
with this ETS table concurrently. Conversely, the couch_server pid is
the only writer, so no need for write_concurrency.
</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>Fix couch_server concurrency error</title>
<updated>2018-09-06T19:12:34+00:00</updated>
<author>
<name>Paul J. Davis</name>
<email>paul.joseph.davis@gmail.com</email>
</author>
<published>2018-09-06T16:01:07+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=f66c734d3c056b6b391f8f8487a7d81c1d55b87f'/>
<id>f66c734d3c056b6b391f8f8487a7d81c1d55b87f</id>
<content type='text'>
Its possible that a busy couch_server and a specific ordering and timing
of events can end up with an open_async message in the mailbox while a
new and unrelated open_async process is spawned. This change just ensure
that if we encounter any old messages in the mailbox that we ignore
them.

The underlying issue here is that a delete request clears out the state
in our couch_dbs ets table while not clearing out state in the message
queue. In some fairly specific circumstances this leads to the message
on in the mailbox satisfying an ets entry for a newer open_async
process. This change just includes a match on the opener process.
Anything unmatched came before the current open_async request which
means it should be ignored.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Its possible that a busy couch_server and a specific ordering and timing
of events can end up with an open_async message in the mailbox while a
new and unrelated open_async process is spawned. This change just ensure
that if we encounter any old messages in the mailbox that we ignore
them.

The underlying issue here is that a delete request clears out the state
in our couch_dbs ets table while not clearing out state in the message
queue. In some fairly specific circumstances this leads to the message
on in the mailbox satisfying an ets entry for a newer open_async
process. This change just includes a match on the opener process.
Anything unmatched came before the current open_async request which
means it should be ignored.
</pre>
</div>
</content>
</entry>
<entry>
<title>Reproduce race condition in couch_server</title>
<updated>2018-09-06T19:12:34+00:00</updated>
<author>
<name>Paul J. Davis</name>
<email>paul.joseph.davis@gmail.com</email>
</author>
<published>2018-09-05T21:25:41+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=1c25163d3782faa18aae0bea2be0d18e7b0b7aaa'/>
<id>1c25163d3782faa18aae0bea2be0d18e7b0b7aaa</id>
<content type='text'>
A rather uncommon bug found in production. Will write more as this is
just for show and tell.

For now this test case just demonstrates the issue that was discovered.
A fix is still being pondered.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A rather uncommon bug found in production. Will write more as this is
just for show and tell.

For now this test case just demonstrates the issue that was discovered.
A fix is still being pondered.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix couch_server:terminate/2</title>
<updated>2018-09-06T19:12:34+00:00</updated>
<author>
<name>Paul J. Davis</name>
<email>paul.joseph.davis@gmail.com</email>
</author>
<published>2018-09-05T21:24:17+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=2195eb352952e66494ec520e920733808e028c0d'/>
<id>2195eb352952e66494ec520e920733808e028c0d</id>
<content type='text'>
If couch_server terminates while there is an active open_async process
it will throw a function_clause exception because `couch_db:get_pid/1`
will fail due to the `#entry.db` member being undefined. Simple fix is
to just filter those out.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If couch_server terminates while there is an active open_async process
it will throw a function_clause exception because `couch_db:get_pid/1`
will fail due to the `#entry.db` member being undefined. Simple fix is
to just filter those out.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #1568 from cloudant/log-changes-rewind-reasons</title>
<updated>2018-09-05T03:39:18+00:00</updated>
<author>
<name>Peng Hui Jiang</name>
<email>jiangphcn@apache.org</email>
</author>
<published>2018-09-05T03:39:18+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=485e9ca62135808b4f82d18733efd051cf1563d4'/>
<id>485e9ca62135808b4f82d18733efd051cf1563d4</id>
<content type='text'>
Log error when changes forced to rewind to beginning</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Log error when changes forced to rewind to beginning</pre>
</div>
</content>
</entry>
<entry>
<title>Log warning when changes seq rewinds to 0</title>
<updated>2018-09-05T02:10:15+00:00</updated>
<author>
<name>Jay Doane</name>
<email>jay.s.doane@gmail.com</email>
</author>
<published>2018-09-05T02:10:15+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=1a75eecfff740713d6c9b474745e6cb40f5a52c3'/>
<id>1a75eecfff740713d6c9b474745e6cb40f5a52c3</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #1591 from apache/create-shards-if-missing</title>
<updated>2018-08-30T18:37:32+00:00</updated>
<author>
<name>Robert Newson</name>
<email>rnewson@apache.org</email>
</author>
<published>2018-08-30T18:37:32+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=32ff5f7cca3f20527fcb5b3aac45062ce45f85a6'/>
<id>32ff5f7cca3f20527fcb5b3aac45062ce45f85a6</id>
<content type='text'>
Create shard files if missing</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Create shard files if missing</pre>
</div>
</content>
</entry>
</feed>
