<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/bitbake/lib/bb/persist_data.py, branch warrior-21.0.2</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=warrior-21.0.2</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=warrior-21.0.2'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2019-06-19T17:04:01+00:00</updated>
<entry>
<title>bitbake: bitbake: Drop duplicate license boilerplace text</title>
<updated>2019-06-19T17:04:01+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2019-05-01T10:47:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=048c1467e2e077076213ec01c4f0d1f181434e4c'/>
<id>urn:sha1:048c1467e2e077076213ec01c4f0d1f181434e4c</id>
<content type='text'>
With the introduction of SPDX-License-Identifier headers, we don't need a ton
of header boilerplate in every file. Simplify the files and rely on the top
level for the full licence text.

(Bitbake rev: 34ed28a412af642a993642c14bd8b95d5ef22cd8)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
Signed-off-by: Armin Kuster &lt;akuster808@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: bitbake: Add initial pass of SPDX license headers to source code</title>
<updated>2019-06-19T17:04:01+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2019-04-30T10:05:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=e1db6a16905f1f7af73e92019b8124881701b81a'/>
<id>urn:sha1:e1db6a16905f1f7af73e92019b8124881701b81a</id>
<content type='text'>
This adds the SPDX-License-Identifier license headers to the majority of
our source files to make it clearer exactly which license files are under.

The bulk of the files are under GPL v2.0 with one found to be under V2.0
or later, some under MIT and some have dual license. There are some files
which are potentially harder to classify where we've imported upstream code
and those can be handled specifically in later commits.

The COPYING file is replaced with LICENSE.X files which contain the full
license texts.

(Bitbake rev: ac556588fac55e91b7ce4839a975eb9ebb5aa192)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
Signed-off-by: Armin Kuster &lt;akuster808@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: bitbake: persist_data: Fix Locking Protocol Error</title>
<updated>2019-01-08T11:16:03+00:00</updated>
<author>
<name>Joshua Watt</name>
<email>jpewhacker@gmail.com</email>
</author>
<published>2019-01-03T16:36:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=cea00c128311539a870d0cd233366480ddaff605'/>
<id>urn:sha1:cea00c128311539a870d0cd233366480ddaff605</id>
<content type='text'>
Under heavy load with process delays, sqlite can issues a "locking
protocol" error (SQLITE_PROTOCOL). Unfortunately, it is impossible to
distinguish between actual locking protocol errors and this race
condition, so they best that can be done is to retry the operation when
the error is detected.

[YOCTO #13108]

(Bitbake rev: 93cd15644f9d12b38abea276fee7b5bade0276df)

Signed-off-by: Joshua Watt &lt;JPEWhacker@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: bitbake: persist_data: Retry database setup</title>
<updated>2018-12-08T17:17:37+00:00</updated>
<author>
<name>Joshua Watt</name>
<email>jpewhacker@gmail.com</email>
</author>
<published>2018-12-07T21:59:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=66318c5831e91f571c167b9d33150523bd30ee95'/>
<id>urn:sha1:66318c5831e91f571c167b9d33150523bd30ee95</id>
<content type='text'>
The configuration of the sqlite database can timeout due to locking
under heavy load and should be subject to the same retry logic as the
other statements.

[YOCTO #13069]

(Bitbake rev: 5a2a95b0396e39662968690b3065d2f88167a71c)

Signed-off-by: Joshua Watt &lt;JPEWhacker@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: persist_data: Disable enable_shared_cache</title>
<updated>2018-12-07T12:38:58+00:00</updated>
<author>
<name>Joshua Watt</name>
<email>jpewhacker@gmail.com</email>
</author>
<published>2018-12-04T03:42:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=7509b5ee0555d1cc8729210e62e122da70b9d080'/>
<id>urn:sha1:7509b5ee0555d1cc8729210e62e122da70b9d080</id>
<content type='text'>
Turns off the shared cache. It isn't a significant factor in performance
(now that WAL is enabled), and is a really bad idea to have enabled in
processes that fork() (as bitbake it prone to do).

[YOCTO #13030]

(Bitbake rev: 71b427bf01374973a971c10cb64024c8ef2a11eb)

Signed-off-by: Joshua Watt &lt;JPEWhacker@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: persist_data: Enable Write Ahead Log</title>
<updated>2018-12-07T12:38:58+00:00</updated>
<author>
<name>Joshua Watt</name>
<email>jpewhacker@gmail.com</email>
</author>
<published>2018-12-04T03:42:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=09b4de78f2ae6fce4d3ef1992d185ec2aa12f475'/>
<id>urn:sha1:09b4de78f2ae6fce4d3ef1992d185ec2aa12f475</id>
<content type='text'>
Enabling the write ahead log improves database reliability, speeds up
writes (since they mostly happen sequentially), and speeds up readers
(since they are no longer blocked by most write operations). The
persistent database is very read heavy, so the auto-checkpoint size is
reduced from the default (usually 1000) to 100 so that reads remain
fast.

[YOCTO #13030]

(Bitbake rev: 79100fa67539f9654af9bf6d3e6842eb5c12e989)

Signed-off-by: Joshua Watt &lt;JPEWhacker@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: persist_data: Add key constraints</title>
<updated>2018-12-07T12:38:58+00:00</updated>
<author>
<name>Joshua Watt</name>
<email>jpewhacker@gmail.com</email>
</author>
<published>2018-12-04T03:42:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=549eccc0db48507dfda25aec1d8b0b5b8e1b3d16'/>
<id>urn:sha1:549eccc0db48507dfda25aec1d8b0b5b8e1b3d16</id>
<content type='text'>
Constructs the "key" column in the persistent database as a non-NULL
primary key. This significantly speeds up lookup operations in large
databases.

[YOCTO #13030]

(Bitbake rev: f5ba7775cfcb90401522d977cc66fe0f5aeb7a66)

Signed-off-by: Joshua Watt &lt;JPEWhacker@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: persist_data: Fix leaking cursors causing deadlock</title>
<updated>2018-12-07T12:38:58+00:00</updated>
<author>
<name>Joshua Watt</name>
<email>jpewhacker@gmail.com</email>
</author>
<published>2018-12-04T03:42:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=7afa726becd9a13deb95299dc8ab83a5df8501db'/>
<id>urn:sha1:7afa726becd9a13deb95299dc8ab83a5df8501db</id>
<content type='text'>
The original implementation of persistent data executed all SQL
statements via sqlite3.Connection.execute(). Behind the scenes, this
function created a sqlite3 Cursor object, executed the statement, then
returned the cursor. However, the implementation did not account for
this and failed to close the cursor object when it was done. The cursor
would eventually be closed when the garbage collector got around to
destroying it. However, sqlite has a limit on the number of cursors that
can exist at any given time, and once this limit is reached it will
block a query to wait for a cursor to be destroyed. Under heavy database
queries, this can result in Python deadlocking with itself, since the
SQL query will block waiting for a free cursor, but Python can no longer
run garbage collection (as it is blocked) to free one.

This restructures the SQLTable class to use two decorators to aid in
performing actions correctly. The first decorator (@retry) wraps a
member function in the retry logic that automatically restarts the
function in the event that the database is locked.

The second decorator (@transaction) wraps the function so that it occurs
in a database transaction, which will automatically COMMIT the changes
on success and ROLLBACK on failure. This function additionally creates
an explicit cursor, passes it to the wrapped function, and cleans it up
when the function is finished.

Note that it is still possible to leak cursors when iterating. This is
much less frequent, but can still be mitigated by wrapping the iteration
in a `with` statement:

 with db.iteritems() as it:
     for (k, v) in it:
         ...

As a side effect, since most statements are wrapped in a transaction,
setting the isolation_level when the connection is created is no longer
necessary.

[YOCTO #13030]

(Bitbake rev: e8b9d3f534ef404780be23b601d5a4bb9cec928a)

Signed-off-by: Joshua Watt &lt;JPEWhacker@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: prserv/persist_data/utils: Drop obsolete python2 imports</title>
<updated>2017-01-09T13:39:13+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2017-01-06T12:35:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=6f6f51783af0e45ebda4442e33c9de1a3932263c'/>
<id>urn:sha1:6f6f51783af0e45ebda4442e33c9de1a3932263c</id>
<content type='text'>
These imports were from python 2.6 and earlier, 2.4 in some cases.
Drop them since we're all python3 now.

(Bitbake rev: 7ef12684e8647b006bf46cae695069d4bfece1cf)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>bitbake: bitbake: remove True option to getVar calls</title>
<updated>2016-11-30T15:48:09+00:00</updated>
<author>
<name>Joshua Lock</name>
<email>joshua.g.lock@intel.com</email>
</author>
<published>2016-11-25T15:28:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=1fce7ecbbb004a5ad82da3eef79cfd52b276708d'/>
<id>urn:sha1:1fce7ecbbb004a5ad82da3eef79cfd52b276708d</id>
<content type='text'>
getVar() now defaults to expanding by default, thus remove the True
option from getVar() calls with a regex search and replace.

Search made with the following regex: getVar ?\(( ?[^,()]*), True\)

(Bitbake rev: 3b45c479de8640f92dd1d9f147b02e1eecfaadc8)

Signed-off-by: Joshua Lock &lt;joshua.g.lock@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
