[Sugar-devel] [PATCH sugar-datastore] don't choke if timestamp property is missing

Sascha Silbe sascha-ml-reply-to-2011-2 at silbe.org
Mon Feb 14 15:52:29 EST 2011


Excerpts from Simon Schampijer's message of Mon Feb 14 21:01:18 +0100 2011:

> So if the timestamp is missing we will create the entry with the current 
> timestamp when we update_the_index. I guess there is no better timestamp 
> we can set.

Exactly. I considered setting it to 0 instead, but the current time
seemed to be a marginally better fit.

> Do we have other properties we should care about?

None that the data store itself requires in order to work properly
(except for those we already check for).

> When restoring the other properties we set as well "update_metadata = 
> True", I think you have to do that here as well.

Yeah, good idea. creation_time might have been written before timestamp
(and the latter not landed on disk). Actually that gives me an idea:
We could try checking creation_time and ctime. I'm not sure the rare
case of timestamp missing is warranting the additional code complexity
of checking those two properties, though.

Sascha

-- 
http://sascha.silbe.org/
http://www.infra-silbe.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 494 bytes
Desc: not available
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20110214/c1da6a5f/attachment.pgp>


More information about the Sugar-devel mailing list