[PATCH 1/3] database: Add notmuch_database_compact_close

David Bremner david at tethera.net
Fri Oct 11 08:15:37 PDT 2013


Tomi Ollila <tomi.ollila at iki.fi> writes:
>
> From functionality point if view this looks safe to me. 
> A followup patch could provide more information to the user
> is any of the following attemts fail, e.g. 
>
> - if removing old database out of the way how to remove the new
>   compacted database which can be considered as garbage now -- or
>   how to rename it (which is a bit dangerous due to potential races)
>
> - if moving compacted database fails how to restore backup database...
>   ... or how to move compacted database to where it was supposed to be
>   moved so that database is usable...
>
> ... if the database is missing is new created from scratch, also in case
> there already is .notmuch directory  ?
>
> ... should the database open try to open database from these alternative
> names in case opening from original name fails ?
>
> another, small change:
>
>       case "${xapian_version}" in
> -         0.*|1.[01].*|1.2.[0-5])
> +         0.*|1.[01].*|1.2.[0-5]|1.2.[0-5][^0-9]*)
>               printf "No (only available with Xapian > 1.2.6).\n" ;;
>
> someone might do version like 1.2.4-abc but probably not 1.2.04 (nor 1.2a.4)
>
> (side note: case $x in [^...]) works with bash (and ksh&zsh, but not with dash)

OK, let's leave those merged, and clean up these issues before the next
release.

d


More information about the notmuch mailing list