[Sugar-devel] [PATCH] sl#2132: reduce _FLUSH_TIMEOUT to 5 seconds
Tomeu Vizoso
tomeu at sugarlabs.org
Mon Aug 2 14:02:21 EDT 2010
On Mon, Aug 2, 2010 at 19:56, Bernie Innocenti <bernie at codewiz.org> wrote:
> This drastically reduces the chance of data loss in the journal on
> crash or power failure.
>
> The previous timeout was set to 60 seconds. It is not clear how much
> time flushing the journal takes on an XO-1. Until we measure, 5 and 60
> are equally unjustified random numbers.
If it took more than half a second to index an entry, we would have
already noticed :p Note that at least some of the micro-SD cards
shipped in the XO 1.5 seem to be even slower at writes.
Seriously, the important thing here is that it's done asynchronously.
Regards,
Tomeu
> ---
> src/carquinyol/indexstore.py | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/src/carquinyol/indexstore.py b/src/carquinyol/indexstore.py
> index 5ed9a0b..cc7f755 100644
> --- a/src/carquinyol/indexstore.py
> +++ b/src/carquinyol/indexstore.py
> @@ -44,7 +44,7 @@ _PREFIX_KEEP = 'K'
> _FLUSH_THRESHOLD = 20
>
> # Force a flush after _n_ seconds since the last change to the db
> -_FLUSH_TIMEOUT = 60
> +_FLUSH_TIMEOUT = 5
>
> _PROPERTIES_NOT_TO_INDEX = ['timestamp', 'preview']
>
> --
> 1.7.2.1
>
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>
More information about the Sugar-devel
mailing list