<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/couchdb.git/src/ddoc_cache, branch devnode-boot-script</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 format_status/2 callback in gen_server implementations</title>
<updated>2020-07-30T12:10:08+00:00</updated>
<author>
<name>ILYA Khlopotov</name>
<email>iilyak@apache.org</email>
</author>
<published>2020-07-23T15:05:12+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=97e7a95c3c25c1ece7db25ee87e6476ba0a11282'/>
<id>97e7a95c3c25c1ece7db25ee87e6476ba0a11282</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Update ddoc_cache to use fabric2</title>
<updated>2020-03-02T17:20:26+00:00</updated>
<author>
<name>Paul J. Davis</name>
<email>paul.joseph.davis@gmail.com</email>
</author>
<published>2019-06-05T18:36:02+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=14984e85b414306f1d6190c6c917dc7dd75ea132'/>
<id>14984e85b414306f1d6190c6c917dc7dd75ea132</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Speedup eunit: ddoc_cache_no_cache_test</title>
<updated>2019-12-25T19:52:32+00:00</updated>
<author>
<name>Paul J. Davis</name>
<email>paul.joseph.davis@gmail.com</email>
</author>
<published>2019-12-25T17:40:07+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=f6654da881e1501d76c9c13fe8a748a57d0db54c'/>
<id>f6654da881e1501d76c9c13fe8a748a57d0db54c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Refactor test to keep setup/teardown out of timer</title>
<updated>2019-08-19T00:56:05+00:00</updated>
<author>
<name>Adam Kocoloski</name>
<email>kocolosk@apache.org</email>
</author>
<published>2019-08-18T13:33:25+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=adc0315ecdb37a30ebb3eeaada70143ebe7dbd70'/>
<id>adc0315ecdb37a30ebb3eeaada70143ebe7dbd70</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Move couch startup to a fixture</title>
<updated>2019-08-09T11:58:04+00:00</updated>
<author>
<name>Adam Kocoloski</name>
<email>kocolosk@apache.org</email>
</author>
<published>2019-08-07T02:46:43+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=aab0c51d8dca39d6556d4636edec20d14f65e36d'/>
<id>aab0c51d8dca39d6556d4636edec20d14f65e36d</id>
<content type='text'>
This improves reliability because that time isn't charged to the test,
and also speeds up the test.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This improves reliability because that time isn't charged to the test,
and also speeds up the test.
</pre>
</div>
</content>
</entry>
<entry>
<title>Move eunit tests into test/eunit directory</title>
<updated>2019-07-29T11:24:37+00:00</updated>
<author>
<name>ILYA Khlopotov</name>
<email>iilyak@apache.org</email>
</author>
<published>2019-05-10T00:45:21+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=cf60cffb44bf18889aa8362b616bafb7bed87445'/>
<id>cf60cffb44bf18889aa8362b616bafb7bed87445</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Suppress export-related compiler warnings</title>
<updated>2018-12-27T21:07:57+00:00</updated>
<author>
<name>Jay Doane</name>
<email>jay.s.doane@gmail.com</email>
</author>
<published>2018-12-27T20:49:47+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=4e75964898bd49218087de1e02391300da024e6c'/>
<id>4e75964898bd49218087de1e02391300da024e6c</id>
<content type='text'>
- For export_all warnings: either replace with explicit exports, add
nowarn_export_all compiler directives when appropriate, or in the case
of couch_epi_sup, move the test to dedicated test file and export the
function needed for testing.

- For "function already exported" warning in couch_key_tree_prop_tests,
remove include_lib attribute for eunit.hrl since it already gets
imported in triq.hrl
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- For export_all warnings: either replace with explicit exports, add
nowarn_export_all compiler directives when appropriate, or in the case
of couch_epi_sup, move the test to dedicated test file and export the
function needed for testing.

- For "function already exported" warning in couch_key_tree_prop_tests,
remove include_lib attribute for eunit.hrl since it already gets
imported in triq.hrl
</pre>
</div>
</content>
</entry>
<entry>
<title>Handle db deletion in couch_db:load_validation_funs</title>
<updated>2018-11-22T12:19:09+00:00</updated>
<author>
<name>ILYA Khlopotov</name>
<email>iilyak@apache.org</email>
</author>
<published>2018-09-27T10:34:01+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=d35b5c9c4a5c2820e25944de2c4fde8bc866c8c1'/>
<id>d35b5c9c4a5c2820e25944de2c4fde8bc866c8c1</id>
<content type='text'>
Previously there were quite a few problems with load_validation_funs
in the case when clustered database is deleted.

- the calls to load_validation_funs were failing with `internal_server` error [1]
- the deleted database stayed opened because:
  - the caller of the load_validation_funs (update_doc) stayed alive
  - the main_pid of the deleted database wasn't killed either
- there was an infinite loop in ddoc_cache_entry trying to recover ddoc from deleted database

The solution is:
- do not call `recover` for deleted database
- close `main_pid`
- use `erlang:error` to crash the caller

[1] - The stack trace was:
```
{database_does_not_exist,[
    {mem3_shards,load_shards_from_db,"bailey/meta",[
        {file,"src/mem3_shards.erl"},{line,394}]},
    {mem3_shards,load_shards_from_disk,1,[
        {file,"src/mem3_shards.erl"},{line,369}]},
    {mem3_shards,for_db,2,[
        {file,"src/mem3_shards.erl"},{line,54}]},
    {fabric_view_all_docs,go,5,[
        {file,"src/fabric_view_all_docs.erl"},{line,24}]},
    {ddoc_cache_entry_validation_funs,recover,1,[
        {file,"src/ddoc_cache_entry_validation_funs.erl"},{line,33}]},
    {ddoc_cache_entry,do_open,1,[
        {file,"src/ddoc_cache_entry.erl"},{line,294}]}]}
```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously there were quite a few problems with load_validation_funs
in the case when clustered database is deleted.

- the calls to load_validation_funs were failing with `internal_server` error [1]
- the deleted database stayed opened because:
  - the caller of the load_validation_funs (update_doc) stayed alive
  - the main_pid of the deleted database wasn't killed either
- there was an infinite loop in ddoc_cache_entry trying to recover ddoc from deleted database

The solution is:
- do not call `recover` for deleted database
- close `main_pid`
- use `erlang:error` to crash the caller

[1] - The stack trace was:
```
{database_does_not_exist,[
    {mem3_shards,load_shards_from_db,"bailey/meta",[
        {file,"src/mem3_shards.erl"},{line,394}]},
    {mem3_shards,load_shards_from_disk,1,[
        {file,"src/mem3_shards.erl"},{line,369}]},
    {mem3_shards,for_db,2,[
        {file,"src/mem3_shards.erl"},{line,54}]},
    {fabric_view_all_docs,go,5,[
        {file,"src/fabric_view_all_docs.erl"},{line,24}]},
    {ddoc_cache_entry_validation_funs,recover,1,[
        {file,"src/ddoc_cache_entry_validation_funs.erl"},{line,33}]},
    {ddoc_cache_entry,do_open,1,[
        {file,"src/ddoc_cache_entry.erl"},{line,294}]}]}
```
</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>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>
