<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/couchdb.git/src/smoosh, 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>fix race condition (#3150)</title>
<updated>2020-09-14T18:12:47+00:00</updated>
<author>
<name>Tony Sun</name>
<email>tony.sun427@gmail.com</email>
</author>
<published>2020-09-14T18:12:47+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=168d635fc8516a1fe655cd7088703bafe3110b33'/>
<id>168d635fc8516a1fe655cd7088703bafe3110b33</id>
<content type='text'>
This fixes a94e693f32672e4613bce0d80d0b9660f85275ea because a race
condition exisited where the 'DOWN' message could be received
before the compactor pid is spawned. Adding a synchronous call to
get the compactor pid guarantees that the couch_db_updater process
handling of finish_compaction has occurred.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes a94e693f32672e4613bce0d80d0b9660f85275ea because a race
condition exisited where the 'DOWN' message could be received
before the compactor pid is spawned. Adding a synchronous call to
get the compactor pid guarantees that the couch_db_updater process
handling of finish_compaction has occurred.</pre>
</div>
</content>
</entry>
<entry>
<title>add remonitor code to DOWN message (#3144)</title>
<updated>2020-09-10T20:35:17+00:00</updated>
<author>
<name>Tony Sun</name>
<email>tony.sun427@gmail.com</email>
</author>
<published>2020-09-10T20:35:17+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=a94e693f32672e4613bce0d80d0b9660f85275ea'/>
<id>a94e693f32672e4613bce0d80d0b9660f85275ea</id>
<content type='text'>
Smoosh monitors the compactor pid to determine when the compaction jobs
finishes, and uses this for its idea of concurrency. However, this isn't
accurate in the case where the compaction job has to re-spawn to catch up on
intervening changes since the same logical compaction job continues with
another pid and smoosh is not aware. In such cases, a smoosh channel with
concurrency one can start arbitrarily many additional database compaction jobs.

To solve this problem, we added a check to see if a compaction PID exists for
a db in `start_compact`. But wee need to add another check because this check
is only for shard that comes off the queue. So the following can still occur:

1. Enqueue a bunch of stuff into channel with concurrency 1
2. Begin highest priority job, Shard1, in channel
3. Compaction finishes, discovers compaction file is behind main file
4. Smoosh-monitored PID for Shard1 exits, a new one starts to finish the job
5. Smoosh receives the 'DOWN' message, begins the next highest priority job,
Shard2
6. Channel concurrency is now 2, not 1

This change adds another check into the 'DOWN' message so that it checks for
that specific shard. If the compaction PID exists then it means a new process
was spawned and we just monitor that one and add it back to the queue. The
length of the queue does not change and therefore we won’t spawn new
compaction jobs.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Smoosh monitors the compactor pid to determine when the compaction jobs
finishes, and uses this for its idea of concurrency. However, this isn't
accurate in the case where the compaction job has to re-spawn to catch up on
intervening changes since the same logical compaction job continues with
another pid and smoosh is not aware. In such cases, a smoosh channel with
concurrency one can start arbitrarily many additional database compaction jobs.

To solve this problem, we added a check to see if a compaction PID exists for
a db in `start_compact`. But wee need to add another check because this check
is only for shard that comes off the queue. So the following can still occur:

1. Enqueue a bunch of stuff into channel with concurrency 1
2. Begin highest priority job, Shard1, in channel
3. Compaction finishes, discovers compaction file is behind main file
4. Smoosh-monitored PID for Shard1 exits, a new one starts to finish the job
5. Smoosh receives the 'DOWN' message, begins the next highest priority job,
Shard2
6. Channel concurrency is now 2, not 1

This change adds another check into the 'DOWN' message so that it checks for
that specific shard. If the compaction PID exists then it means a new process
was spawned and we just monitor that one and add it back to the queue. The
length of the queue does not change and therefore we won’t spawn new
compaction jobs.</pre>
</div>
</content>
</entry>
<entry>
<title>Address flaky test failure on t_invalid_view/1</title>
<updated>2020-01-09T17:48:31+00:00</updated>
<author>
<name>jiangph</name>
<email>jiangph@cn.ibm.com</email>
</author>
<published>2020-01-09T15:51:11+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=628e7578e659daa600d93bcad2c5c8a4d5f6e94c'/>
<id>628e7578e659daa600d93bcad2c5c8a4d5f6e94c</id>
<content type='text'>
- Start couch_log to make sure that couch_log_server proc exists
and write log instead of getting noproc error during test
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Start couch_log to make sure that couch_log_server proc exists
and write log instead of getting noproc error during test
</pre>
</div>
</content>
</entry>
<entry>
<title>Speedup eunit: smoosh_server</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:43:17+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=19c67e1e52a4071e1c41e6c36cf6b6ddd2e448e2'/>
<id>19c67e1e52a4071e1c41e6c36cf6b6ddd2e448e2</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Suppress exunit compiler warning</title>
<updated>2019-12-13T23:40:45+00:00</updated>
<author>
<name>Jay Doane</name>
<email>jaydoane@apache.org</email>
</author>
<published>2019-12-13T23:40:45+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=c2ff5b720f5fe87d894c144eab09efcba5412002'/>
<id>c2ff5b720f5fe87d894c144eab09efcba5412002</id>
<content type='text'>
This patch suppresses this warning when `make exunit` is run:

warning: unused alias Setup
  src/smoosh/test/exunit/scheduling_window_test.exs:4
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch suppresses this warning when `make exunit` is run:

warning: unused alias Setup
  src/smoosh/test/exunit/scheduling_window_test.exs:4
</pre>
</div>
</content>
</entry>
<entry>
<title>Switch to UTC</title>
<updated>2019-12-13T23:38:09+00:00</updated>
<author>
<name>Jay Doane</name>
<email>jaydoane@apache.org</email>
</author>
<published>2019-12-13T23:38:09+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=ff177726a23f49be391f162cff53aa89341ddb2d'/>
<id>ff177726a23f49be391f162cff53aa89341ddb2d</id>
<content type='text'>
The tests assume UTC, and often fail when run in non-GMT time zones.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The tests assume UTC, and often fail when run in non-GMT time zones.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add 'src/smoosh/' from commit '78eba8444c0ba50994c7b686251f3a7c21dc92ce'</title>
<updated>2019-11-22T15:13:14+00:00</updated>
<author>
<name>Adam Kocoloski</name>
<email>kocolosk@apache.org</email>
</author>
<published>2019-11-22T15:13:14+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=37c8ace821578b0de42841298f6ad57c2a401049'/>
<id>37c8ace821578b0de42841298f6ad57c2a401049</id>
<content type='text'>
git-subtree-dir: src/smoosh
git-subtree-mainline: 0155bd884bd8c455cc4057811cf67035b04c427f
git-subtree-split: 78eba8444c0ba50994c7b686251f3a7c21dc92ce
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-subtree-dir: src/smoosh
git-subtree-mainline: 0155bd884bd8c455cc4057811cf67035b04c427f
git-subtree-split: 78eba8444c0ba50994c7b686251f3a7c21dc92ce
</pre>
</div>
</content>
</entry>
</feed>
