David Bustos wrote:
> Quoth Alan Maguire on Thu, Jun 26, 2008 at 04:48:35PM +0100:
>   
>> David Bustos wrote:
>>     
>>> Quoth Alan Maguire on Mon, Jun 23, 2008 at 05:05:13PM +0100:
>>>       
>>>> http://cr.opensolaris.org/~amaguire/smf_ordered_values/
>>>>         
>>> cmd/svc/configd/backend.c
>>>       
> ...
>   
>>>   1697: I don't understand why we would need to check whether the
>>>     database has been upgraded without upgrading it.  Please explain it
>>>     to me.
>>>       
>> The logic here is that during boot, we want to determine
>> as soon as possible if the repository is already upgraded,
>> as if it is, we can use the value-ordered SELECT statement
>> when retrieving values. By doing the upgrade check here,
>> we catch the fact that the repository has been upgraded,
>> set be_normal_upgraded to TRUE, and thus property
>> retrieval will determine that we can use the value_order
>> column in the SELECT statement used in fill_property_callback()
>> (in file_object.c). I've elaborated a bit in the comment here and
>> above backend_check_upgrade(), hopefully it's a bit
>> clearer now.
>>     
>
> Ah, yes, we assume that the repository is not upgraded, so since we want
> reads to be ordered if possible before the repository becomes writable,
> we need to check on each start up.  Do you know whether clients can get
> any requests in between there and the zone-boot check?
Doesn't look like it - backend_init() is called way before
door_server_create() in configd.c.
>   If not,
> I suspect you could consolidate the two calls into one.  But I don't
> think there's enough benefit to that to change your code now.
>
>   
okay.
> By the way, did you notice the "Eventually, we'll support schema upgrade
> here." comment at 1576?  It seems like you're making this a bit stale.
> I suppose it's not a big enough deal to change now, though.
>
>   
hmm, probably no harm to remove it, I suspect it might
confuse people unnecessarily. Thanks!

Alan

Reply via email to