On Friday, June 5, 2020 at 12:44:11 PM UTC-4, John Kline wrote:
>
> > I am not sure that it is even possible for the file to be in a state 
> that would cause a problem when the weewx service tries to read it.
>
> If you are saying that you don’t think it’s possible for the file to be 
> read in an inconsistent state, let’s just agree to disagree on that one.
>
> If you are saying that it doesn’t matter if the file is read in an 
> inconsistent state; that’s a deeper thought experiment.
>
> In any event, I’m happy that you got this running.
>

I am saying that, *in the very specific circumstances we are discussing*, 
it is (at the least) very improbable indeed that the file will be in an 
inconsistent or problematic state when the weewx service tries to read it. 
In the more general case, and particularly with longer files, and/or when 
the 'write' side is appending to a file, rather than overwriting an 
existing file, there are a lot more ways in which things can go wrong, and 
one's coding has to take account of the possibilities.

On the question of whether it matters if the file is very occasionally in 
an inconsistent state when it is read: again,* in these very specific 
circumstances,* it probably doesn't - at worst, one set of data may be 
lost, but. in fact, I believe that the desired data substitution would not 
take place for that packet or record.

In any event, I also still don't see, in these circumstances, why you 
believe that your suggested approach would be any better. Deciding on that 
would require very much more detailed knowledge of the internals of the 
file system's operations than I would claim to have.

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/8c960dc9-9b8a-4c71-9af3-b71f9bd5a2e7o%40googlegroups.com.

Reply via email to