<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/couchdb.git/src/couch_jobs, 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 more couch_jobs flakiness</title>
<updated>2021-03-12T21:51:14+00:00</updated>
<author>
<name>Nick Vatamaniuc</name>
<email>vatamane@apache.org</email>
</author>
<published>2021-03-12T21:12:05+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=c508efedcabd560449e4dcbd7774a04b3907257e'/>
<id>c508efedcabd560449e4dcbd7774a04b3907257e</id>
<content type='text'>
The errors see in #3417 seem to indicate the expiration jobs are interfering
with the couch_jobs tests, to prevent that prevent expiration_db job gen_server
from starting at all.

Fixes #3417
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The errors see in #3417 seem to indicate the expiration jobs are interfering
with the couch_jobs tests, to prevent that prevent expiration_db job gen_server
from starting at all.

Fixes #3417
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix couch_jobs to be less flaky</title>
<updated>2021-03-12T19:15:56+00:00</updated>
<author>
<name>Nick Vatamaniuc</name>
<email>vatamane@apache.org</email>
</author>
<published>2021-03-10T23:16:42+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=304a0634a2e06fdedd0746d39984e27147391842'/>
<id>304a0634a2e06fdedd0746d39984e27147391842</id>
<content type='text'>
It turns out fabric is dependent on couch_jobs because of db expiration module.
So when couch_jobs was restarted multiple times per test case it could have
brought down fabric. However, since couch_jobs needs fabric for transactional
stuff it ended up brining couch_jobs app down as well.

To fix it:

 * Switch to explicitly starting/stopping fabric and couch_jobs together

 * Break appart bad_messages* tests to individually test each type of message
   as app restarts in the middle of the tests kept killing fabric and
   intermettently killing couch_jobs a well.

 * Also make the tests look nicer by re-using ?TDEF_FE macros from
   `fabric2_test`, this we can avoid the `?_test(begin... end).` pattern.

 * Remove meck:unload since we don't really meck anything in the module

 * Don't need to spend time cleaning out database as we don't really create
   that many dbs (just one) and that one gets cleaned out in its own test.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It turns out fabric is dependent on couch_jobs because of db expiration module.
So when couch_jobs was restarted multiple times per test case it could have
brought down fabric. However, since couch_jobs needs fabric for transactional
stuff it ended up brining couch_jobs app down as well.

To fix it:

 * Switch to explicitly starting/stopping fabric and couch_jobs together

 * Break appart bad_messages* tests to individually test each type of message
   as app restarts in the middle of the tests kept killing fabric and
   intermettently killing couch_jobs a well.

 * Also make the tests look nicer by re-using ?TDEF_FE macros from
   `fabric2_test`, this we can avoid the `?_test(begin... end).` pattern.

 * Remove meck:unload since we don't really meck anything in the module

 * Don't need to spend time cleaning out database as we don't really create
   that many dbs (just one) and that one gets cleaned out in its own test.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add fold_jobs/4 and pending_count/2,3 to couch_jobs API</title>
<updated>2020-09-15T20:13:46+00:00</updated>
<author>
<name>Nick Vatamaniuc</name>
<email>vatamane@apache.org</email>
</author>
<published>2020-08-28T08:30:53+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=d2c9dffa3aca3b3e2faed49526b0065ebb845fad'/>
<id>d2c9dffa3aca3b3e2faed49526b0065ebb845fad</id>
<content type='text'>
fold_jobs/4 is a generalized folding API which can be used to process all the
jobs of a particular type.

get_pending_count/2,3 can be used to get the count of pending jobs. It takes
the same options as accept, including a limit and `max_sched_time`. Just like
accept it reads the range of pending jobs as a snapshot to avoid generating
read conflicts.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
fold_jobs/4 is a generalized folding API which can be used to process all the
jobs of a particular type.

get_pending_count/2,3 can be used to get the count of pending jobs. It takes
the same options as accept, including a limit and `max_sched_time`. Just like
accept it reads the range of pending jobs as a snapshot to avoid generating
read conflicts.
</pre>
</div>
</content>
</entry>
<entry>
<title>Handle possible iodata from jiffy:encode in couch_jobs</title>
<updated>2020-09-15T20:13:46+00:00</updated>
<author>
<name>Nick Vatamaniuc</name>
<email>vatamane@apache.org</email>
</author>
<published>2020-08-28T08:30:39+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=9897cd84a37fa0062dfba15f2e0eb6cc611be74a'/>
<id>9897cd84a37fa0062dfba15f2e0eb6cc611be74a</id>
<content type='text'>
Also, ensure to use the same options as other couch apps: force_utf8 and
dedupe_keys.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also, ensure to use the same options as other couch apps: force_utf8 and
dedupe_keys.
</pre>
</div>
</content>
</entry>
<entry>
<title>Update all the type monitors after setting any couch jobs type timeout</title>
<updated>2020-09-09T20:37:34+00:00</updated>
<author>
<name>Nick Vatamaniuc</name>
<email>vatamane@apache.org</email>
</author>
<published>2020-09-09T00:14:18+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=6cedf870b9e1580007f7c20a0359d4be3d5abc3b'/>
<id>6cedf870b9e1580007f7c20a0359d4be3d5abc3b</id>
<content type='text'>
This mostly helps with flaky tests where some jobs might complete before the
type monitor discovers this particular type, so opt to always re-scan and start
notification monitors when any type timeout is set.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This mostly helps with flaky tests where some jobs might complete before the
type monitor discovers this particular type, so opt to always re-scan and start
notification monitors when any type timeout is set.
</pre>
</div>
</content>
</entry>
<entry>
<title>clear jobs data in active area during removal</title>
<updated>2020-08-25T18:28:45+00:00</updated>
<author>
<name>Tony Sun</name>
<email>tony.sun427@gmail.com</email>
</author>
<published>2020-08-25T18:22:06+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=978f7dae6748e09830593f132e6977682e7d9453'/>
<id>978f7dae6748e09830593f132e6977682e7d9453</id>
<content type='text'>
During job removal, it was not cleared from the active area so
active_tasks would mistakenly believe the job still existed. When we
try to actually open the data it is not there and not_found error
would be issued.@nickva found this issue during replication work.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
During job removal, it was not cleared from the active area so
active_tasks would mistakenly believe the job still existed. When we
try to actually open the data it is not there and not_found error
would be issued.@nickva found this issue during replication work.
</pre>
</div>
</content>
</entry>
<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>add get_active_job_ids and get_types</title>
<updated>2020-07-24T16:48:16+00:00</updated>
<author>
<name>Tony Sun</name>
<email>tony.sun427@gmail.com</email>
</author>
<published>2020-07-24T16:47:09+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=0a444461920c2b95d9ef8ef3c6512ee37f9af351'/>
<id>0a444461920c2b95d9ef8ef3c6512ee37f9af351</id>
<content type='text'>
We expose get_types in couch_jobs and also add get_active_jobs_ids
to get the active job ids given a certain type.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We expose get_types in couch_jobs and also add get_active_jobs_ids
to get the active job ids given a certain type.
</pre>
</div>
</content>
</entry>
<entry>
<title>Handle transaction and future timeouts in couch_jobs notifiers</title>
<updated>2020-06-10T21:31:33+00:00</updated>
<author>
<name>Nick Vatamaniuc</name>
<email>vatamane@apache.org</email>
</author>
<published>2020-06-10T21:22:36+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=b17bc49aac9e20696ca530bb09e21cefa4e4d6d1'/>
<id>b17bc49aac9e20696ca530bb09e21cefa4e4d6d1</id>
<content type='text'>
In an overload scenario do not let notifiers crash and lose their subscribers,
instead make them more robust and let them retry on future or transaction
timeouts.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In an overload scenario do not let notifiers crash and lose their subscribers,
instead make them more robust and let them retry on future or transaction
timeouts.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix couch_jobs accept timeout when no_schedule option is used</title>
<updated>2020-06-03T20:16:01+00:00</updated>
<author>
<name>Nick Vatamaniuc</name>
<email>vatamane@apache.org</email>
</author>
<published>2020-06-03T16:40:24+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/couchdb.git/commit/?id=2e938cae2083a16173b39f03b909c0d22201a443'/>
<id>2e938cae2083a16173b39f03b909c0d22201a443</id>
<content type='text'>
When waiting to accept jobs and scheduling was used, timeout is limited based
on the time scheduling parameter. When no_schedule option is used, time
scheduling parameter is set to 0 always, and so in that case, we have to
special-case the limit to return `infinity`.

Later on when we wait for the watch to fire, the actual timeout can still be
limited, by a separate user specified timeout option, but if user specifies
`infinity` there and sets `#{no_schedule =&gt; true}` then we should respect and
never return `{error, not_found}` in response.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When waiting to accept jobs and scheduling was used, timeout is limited based
on the time scheduling parameter. When no_schedule option is used, time
scheduling parameter is set to 0 always, and so in that case, we have to
special-case the limit to return `infinity`.

Later on when we wait for the watch to fire, the actual timeout can still be
limited, by a separate user specified timeout option, but if user specifies
`infinity` there and sets `#{no_schedule =&gt; true}` then we should respect and
never return `{error, not_found}` in response.
</pre>
</div>
</content>
</entry>
</feed>
