[Sugar-devel] [PATCH] sl#2132: reduce _FLUSH_TIMEOUT to 5 seconds

Aleksey Lim alsroot at member.fsf.org
Mon Aug 2 14:10:24 EDT 2010


On Mon, Aug 02, 2010 at 01:56:28PM -0400, Bernie Innocenti 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.
> ---
>  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']

pushed

>  
> -- 
> 1.7.2.1
> 

-- 
Aleksey


More information about the Sugar-devel mailing list