<feed xmlns='http://www.w3.org/2005/Atom'>
<title>notmuch/lib/open.cc, branch 0.34.1</title>
<subtitle>thread-based email index, search, and tagging</subtitle>
<id>https://git.notmuchmail.org/git/notmuch/atom?h=0.34.1</id>
<link rel='self' href='https://git.notmuchmail.org/git/notmuch/atom?h=0.34.1'/>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/'/>
<updated>2021-10-30T16:51:50Z</updated>
<entry>
<title>lib/load_config: deallocate / NULL database on fatal error</title>
<updated>2021-10-30T16:51:50Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-10-23T13:22:38Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=fe51c275fcd7107d92b40de511086300ba4060ed'/>
<id>urn:sha1:fe51c275fcd7107d92b40de511086300ba4060ed</id>
<content type='text'>
This fixes a potential memory leak, and makes the behaviour of
notmuch_database_load_config (somewhat) consistent with
n_d_{open,create} with config.
</content>
</entry>
<entry>
<title>lib/create: fix memory leak, ensure *database=NULL on error</title>
<updated>2021-10-30T16:47:47Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-10-23T13:22:36Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=2ba50b52302dce08068843e0029f9ee935a0d7f3'/>
<id>urn:sha1:2ba50b52302dce08068843e0029f9ee935a0d7f3</id>
<content type='text'>
This code previously relied on _finish_open to free the notmuch struct
on errors (except for the case of database == NULL, which was a
potential double free). When we removed those frees from _finish_open,
we introduced a (small) memory leak.

In this commit, fix the memory leak, and harmonize the on-error
behaviour with n_d_open_with_config.
</content>
</entry>
<entry>
<title>lib/open: fix potential double-free, ensure *database=NULL on error</title>
<updated>2021-10-30T16:43:58Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-10-23T13:22:34Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=74c4ce6d88bcc643424c5d89cc8d30cd835e46c3'/>
<id>urn:sha1:74c4ce6d88bcc643424c5d89cc8d30cd835e46c3</id>
<content type='text'>
During refactoring for 0.32, the code that set notmuch=NULL on various
errors was moved into _finish_open. This meant that the the code which
relied on that to set *database to NULL on error was no longer
correct. It also introduced a potential double free, since the notmuch
struct was deallocated inside _finish_open (via n_d_destroy).

In this commit we revert to "allocator frees", and leave any cleanup
to the caller of _finish_open. This allows us to get back the
behaviour of setting *database to NULL with a small change. Other
callers of _finish_open will need free notmuch on errors.
</content>
</entry>
<entry>
<title>lib: leave stemmer object accessible</title>
<updated>2021-09-05T00:07:19Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-08-24T15:17:17Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=3202e0d1feba1ab955ba1c07098c00208f8f0ada'/>
<id>urn:sha1:3202e0d1feba1ab955ba1c07098c00208f8f0ada</id>
<content type='text'>
This enables using the same stemmer in both query parsers.
</content>
</entry>
<entry>
<title>Merge tag 'debian/0.32.3-1'</title>
<updated>2021-08-19T04:46:42Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-08-19T04:46:42Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=3df2281746d57abbb45790ecb432ef40533c30bc'/>
<id>urn:sha1:3df2281746d57abbb45790ecb432ef40533c30bc</id>
<content type='text'>
notmuch release 0.32.3-1 for unstable (sid) [dgit]

[dgit distro=debian no-split --quilt=linear]
</content>
</entry>
<entry>
<title>lib/open: look in MAILDIR for database, as documented.</title>
<updated>2021-08-18T00:09:21Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-08-04T10:42:35Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=d9300116909ea316c84fd6d3ee57c89074dcd260'/>
<id>urn:sha1:d9300116909ea316c84fd6d3ee57c89074dcd260</id>
<content type='text'>
This fixes the bug id:87bl9lx864.fsf@kisara.moe
</content>
</entry>
<entry>
<title>lib: autocommit after some number of completed transactions</title>
<updated>2021-06-27T17:03:00Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-05-18T02:06:01Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=e2a3e5fa51122efb0f5ac836e536881d97deef1a'/>
<id>urn:sha1:e2a3e5fa51122efb0f5ac836e536881d97deef1a</id>
<content type='text'>
This change addresses two known issues with large sets of changes to
the database.  The first is that as reported by Steven Allen [1],
notmuch commits are not "flushed" when they complete, which means that
if there is an open transaction when the database closes (or e.g. the
program crashes) then all changes since the last commit will be
discarded (nothing is irrecoverably lost for "notmuch new", as the
indexing process just restarts next time it is run).  This does not
really "fix" the issue reported in [1]; that seems rather difficult
given how transactions work in Xapian. On the other hand, with the
default settings, this should mean one only loses less than a minutes
worth of work.  The second issue is the occasionally reported "storm"
of disk writes when notmuch finishes. I don't yet have a test for
this, but I think committing as we go should reduce the amount of work
when finalizing the database.

[1]: id:20151025210215.GA3754@stebalien.com
</content>
</entry>
<entry>
<title>lib/{open,message}: make some internal functions static</title>
<updated>2021-06-05T18:40:00Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-05-24T00:08:28Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=b0a11dbc3822271e948f625ca326e86ff68f2e57'/>
<id>urn:sha1:b0a11dbc3822271e948f625ca326e86ff68f2e57</id>
<content type='text'>
They are not used outside their file, so being extern seems like an oversight
</content>
</entry>
<entry>
<title>Merge branch 'release'</title>
<updated>2021-05-15T12:10:58Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-05-15T12:10:58Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=c84ccb70f3ed2b2228346499b5110311039a0ecf'/>
<id>urn:sha1:c84ccb70f3ed2b2228346499b5110311039a0ecf</id>
<content type='text'>
</content>
</entry>
<entry>
<title>lib/open: restore default database path of $HOME/mail</title>
<updated>2021-05-15T11:40:05Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2021-05-10T10:39:18Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=b3258244c84a7673db39c46cad96ddb63b131dae'/>
<id>urn:sha1:b3258244c84a7673db39c46cad96ddb63b131dae</id>
<content type='text'>
Although this default worked for "notmuch config get", it didn't work
most other places. Restore the previous functionality, with the
wrinkle that XDG locations will shadow $HOME/mail if they exist.

This fixes a bug reported by Jack Kamm in id:87eeefdc8b.fsf@gmail.com
</content>
</entry>
</feed>
