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

Simon Schampijer simon at schampijer.de
Tue Feb 15 11:11:22 EST 2011


On 02/14/2011 03:52 PM, Sascha Silbe wrote:
> 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.

Hmm, where does the ctime property actually comes from, is it a property 
of the old DS?

I think just doing the check as you have it and setting 
"update_metadata" to true should be enough.

Regards,
    Simon



More information about the Sugar-devel mailing list