<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/bitbake/lib/prserv/db.py, branch dizzy-12.0.1</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=dizzy-12.0.1</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=dizzy-12.0.1'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2014-12-31T10:10:20+00:00</updated>
<entry>
<title>bitbake: prserv: Use WAL mode</title>
<updated>2014-12-31T10:10:20+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2014-11-05T16:58:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=c35cecebc6a407bac14a9f1b8dff5dbc85130f77'/>
<id>urn:sha1:c35cecebc6a407bac14a9f1b8dff5dbc85130f77</id>
<content type='text'>
Ideally, we want the PR service to have minimal influence from
queued disk IO. sqlite tends to be paranoid about data loss and
locks/fsync calls. There is a "WAL mode" which changes the journalling
mechanism and would appear much better suited to our use case.

This patch therefore switches the database to use WAL mode. With this
change, write overhead appears significantly reduced.

(Bitbake rev: 90b05e79764b684b20ce8454e89f05763b02ac97)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: prserv: don't wait until exit to sync</title>
<updated>2014-12-31T10:10:20+00:00</updated>
<author>
<name>Ben Shelton</name>
<email>ben.shelton@ni.com</email>
</author>
<published>2014-10-27T17:27:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=e3743bbe945d77e14e2593fc6a1f255f71b96861'/>
<id>urn:sha1:e3743bbe945d77e14e2593fc6a1f255f71b96861</id>
<content type='text'>
In the commit 'prserv: Ensure data is committed', the PR server moved to
only committing transactions to the database when the PR server is
stopped.  This improves performance, but it means that if the machine
running the PR server loses power unexpectedly or if the PR server
process gets SIGKILL, the uncommitted package revision data is lost.

To fix this issue, sync the database periodically, once per 30 seconds
by default, if it has been marked as dirty.  To be safe, continue to
sync the database at exit regardless of its status.

(Bitbake rev: 973ac2cc63323ca9c3e916effa4765747db3564c)

Signed-off-by: Ben Shelton &lt;ben.shelton@ni.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: prserv/db: Avoid fsync() calls</title>
<updated>2014-05-03T10:24:48+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2014-05-03T10:18:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=0304d92a9727ec9f8ea30f0cacaa29a66683bdab'/>
<id>urn:sha1:0304d92a9727ec9f8ea30f0cacaa29a66683bdab</id>
<content type='text'>
If the power were to fail, it doesn't matter to us much if the data
makes it to disk or not, we'd have other problems. However an fsync()
call on a multi build autobuilder is painful so lets avoid them.

(Bitbake rev: 4eb2dc8048e2722d64d589f453df1ce6262c71b8)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: prserv: Ensure data is committed</title>
<updated>2013-09-08T09:51:56+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2013-09-08T09:45:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=2ab1bf27f79beadc45e86a26c85fc0b95ae3496f'/>
<id>urn:sha1:2ab1bf27f79beadc45e86a26c85fc0b95ae3496f</id>
<content type='text'>
In exclusive mode, we need to complete the transaction for writes to make
it to the database. Therefore add sync calls to ensure this happens.

Autocommit mode is significantly (100 times) slower so caching the
data is of significant benefit.

(Bitbake rev: 4e55f7821786a59c2cd7dbd8bfa2a22f5f196e99)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: serv/db: Don't use BEGIN/COMMIT</title>
<updated>2013-09-01T14:51:11+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2013-08-31T22:42:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=bd023ef9c093b7e79bf44d8332744161eed56a18'/>
<id>urn:sha1:bd023ef9c093b7e79bf44d8332744161eed56a18</id>
<content type='text'>
Since we don't support using multiple servers on the same database file,
don't use the BEGIN/COMMIT syntax and allow writes to the database
to work ~100 times faster with no transaction locking.

(Bitbake rev: 42144a54979658f93fbbb43f7e271c1fff4d88ff)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: serv/db: Take an excluside lock on the database</title>
<updated>2013-09-01T14:51:11+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2013-08-31T22:42:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=883813deae842c25d9172aeceb5302fdec1258df'/>
<id>urn:sha1:883813deae842c25d9172aeceb5302fdec1258df</id>
<content type='text'>
We only support one server using the database at a time so take an exclusive
lock and avoid later lock overhead.

(Bitbake rev: e3e39be6f2d063858c92971ce8ccd89c95d4f26d)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: serv/db: Fix looping upon database locked issues</title>
<updated>2013-09-01T14:51:11+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2013-08-31T22:41:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=3e5abff7da73fe35842c06cd85e2a4f50c4efa05'/>
<id>urn:sha1:3e5abff7da73fe35842c06cd85e2a4f50c4efa05</id>
<content type='text'>
If the database is locked we will get an immediate error indicating so,
there is no retry timeout. The looping code is therefore useless, the loop
count is near instantly exceeded.

Using a time based retry means we can wait a sensible time, then gracefully
exit.

(Bitbake rev: 9f9e6d87007ea87e62495705464f4232c996a165)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: prserv: Allow 'table is locked' matching for retry loop</title>
<updated>2013-08-30T16:53:26+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2013-08-30T16:52:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=5fd04b0258db6c89cf00c27463e3a6e23353d010'/>
<id>urn:sha1:5fd04b0258db6c89cf00c27463e3a6e23353d010</id>
<content type='text'>
Try and avoid errors like "ERROR: database table is locked: PRMAIN_nohist"
by retrying if we see the string "is locked".

(Bitbake rev: 1a175b51f80d13f747b653d29e9c0d2201b5109c)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: prserv/db: Threading fixes</title>
<updated>2013-08-28T23:13:22+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2013-08-28T16:06:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=06d76645900b2a7db8f88a0ad3bf4ae66cef52f1'/>
<id>urn:sha1:06d76645900b2a7db8f88a0ad3bf4ae66cef52f1</id>
<content type='text'>
Enabling threading for the PRServer causes a number of issues. Firstly is
the obtuse error:

sqlite3.InterfaceError: Error binding parameter 0 - probably unsupported type

which is due to the class not being derived from object. See:
http://docs.python.org/2/library/sqlite3.html#registering-an-adapter-callable

Secondly, we want to enable multithreadded access to the database so we do this
when we open it. This opens the way up to multithreading the PR server.

(Bitbake rev: 5709efc2ff1e36529bd28f49cd093ccfa7abff7f)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: Automatically start local PR service.</title>
<updated>2012-01-11T10:36:20+00:00</updated>
<author>
<name>Lianhao Lu</name>
<email>lianhao.lu@intel.com</email>
</author>
<published>2012-01-10T06:13:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=489cde8eb0e19ef6fe8078148199eaf5b52631ae'/>
<id>urn:sha1:489cde8eb0e19ef6fe8078148199eaf5b52631ae</id>
<content type='text'>
[YOCTO #1126]
A local PR service will be started and stopped automatically along
with the bitbake invocation/ternimation.

This local PR service will be started only and if only when the
PRSERV_HOST is set to 'localhost' and PRSERV_PORT is set to '0'.

When started, the sqlite3 database is stored at
"${PERSISTEN_DIR}/prserv.sqlite3" or "${CACHE}/prserv.sqlite3".

(Bitbake rev: 9d8f45407c67ed0d3c4f820cf646de3c385067c7)

Signed-off-by: Lianhao Lu &lt;lianhao.lu@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
