Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Cc: openembedded-core <openembedded-core@lists.openembedded.org>
Subject: Re: PR_Service. Sync database only on clean stop?
Date: Thu, 05 Jun 2014 12:33:16 +0100	[thread overview]
Message-ID: <1401967996.12440.185.camel@ted> (raw)
In-Reply-To: <CAPybu_3Jz=KNmYjE+crCFBuxpmJGmS7DfOM9fmDXFGOADmwyFg@mail.gmail.com>

On Wed, 2014-06-04 at 22:52 +0200, Ricardo Ribalda Delgado wrote:
> Hello
> 
> I have been running happily with pr_service for two months.
> Unfortunately, due to a power down the computer running the pr server
> has stopped.
> When I have started the server I have discovered that all the
> information about PR was lost :S. I assumed this was due to a db
> corruption, but I have later discovered that the database is not
> synced after every insert.
> 
> I guess this is to improve the performance, but I don't think that
> everybody prefer this behaviour, right now I have to remake and
> distribute only 10 flashes, something reasonable, but it would have a
> disaster later in our development cycle.
> 
> Is somebody working on a parameter for the db to be persistent? Would
> a patch to implement this be considered?

The trouble if I remember rightly is that the way the queries work in
there, you can't tell if an update was made the database during the read
or not. The older code therefore synced on *every* read and this was a
significant bottleneck.

So patches would be considered and I agree the current behaviour is bad
but we need to be mindful of performance too. Some kind of idle sync on
a timer might be better than specific numbers for example, particularly
if we can query whether the data is "dirty" before running the sync
commands.

Cheers,

Richard





      reply	other threads:[~2014-06-05 11:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-04 20:52 PR_Service. Sync database only on clean stop? Ricardo Ribalda Delgado
2014-06-05 11:33 ` Richard Purdie [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1401967996.12440.185.camel@ted \
    --to=richard.purdie@linuxfoundation.org \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=ricardo.ribalda@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox