Charmed Quark Systems, Ltd. - Support Forums and Community

Full Version: Official 5.3 Beta Discussion Thread
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Well, I'm right back where I was on the Z-Wave driver. The lock no longer responds to security messages. This is like pulling teeth, except it's my own teeth.
OK, I figured that out and I've made some good forward progress. It looks like I definitely have to do a no-op ping command to the lock before sending it commands, to make sure it wakes up. But I'm now correctly probing the unit upon inclusion, and I'm able to check it for changes when I come back up. I have a field that indicates the driver's state which will help in debugging a lot. So is it replicating, is it reconciling replication info against old config, is it in the network securely, or did something go wrong and its in the network but not securely, is it getting initial field info from the units.
Nice Dean, good to hear that you mare making forward progress again!
So I just found out something weird. Any time the MS accepts a file to store, it does a standard little dance that is required to insure that all the new data is written to disc before the old file is affected. So, if the write fails, the old file is at least left intact. So you just write the data to a new file then you rename the original to a backup name, then you rename the new file to the original file name.

There is an OS API (ReplaceFile) that does this, and that's what ends up being called down in the guts of my file system frameworks. However, I thought that was atomic, i.e. it either works or the original file renames unaffected. But, it turns out it can fail such that the original file has been renamed, but the new file cannot be moved in to replace it. So you could in theory 'lose' the file in the sense that it no longer has its original name. There are also failures of course that haven't affected either file, and in that case you can just retry the operation.

Of course the only likely reason it would fail, at least in a situation like this where the files are accessed by way of a client/server framework that only allows a single client to access a file at once, is an anti-virus program interfering. Apparently that was happening to Bryan on some of his Pluckers systems. In this case, the writing of the new data would fail, so his changes were not actually being saved. Not quite as bad as the worst case scenario but that may have been happening as well.

I've updated my wrapper method to watch for those partial errors and attempt to complete the operation or recover, and to retry where possible, so as to either complete it or fail with the original file still in place. On a partial failure I try to complete the final rename myself, either to get the new file moved over, or to get the original file moved back worst case. The rename methods already do their own retries.

Luckily since it is access done via a server, we can insure that nothing else of ours is going to try to access the file in that time, which would be really messy. The AV at least will just do his scan and move on, but won't actually try to do any of its own renaming or anything.

That's a real shortcoming in Windows I have to say.
Is this the reason for the scaling problem?
As per my previous e-mail to you, probably it is. I recommend there to, as a test in the meantime, try making your anti-virus ignore the CQC directory and see if the issues go away. When you do a scale, it starts spitting out lots of files, the anti-virus starts probably scanning the files and interferes at just the wrong time in some cases.
Well, I'm officially sick to death of winter already and it's just begun.
(01-03-2018, 11:21 AM)Dean Roddey Wrote: [ -> ]Well, I'm officially sick to death of winter already and it's just begun.

Dean, You getting any of the bombogenesis heading up the east coast?
As usual we are just on the edge of it, as we tend to be for any big thing moving through. We are getting lots of cold weather (for around here), and the weather forecast kept saying snow, no snow, little snow, lot of snow. Looks like now it will be a sprinkling if any. On the RADAR the heavy cloud cover just slipped to the east of here.

I'm fairly sure that the weather forecasting in this situations consists of rolling some bones every 15 minutes. I've been tracking the forecast and it's changing wildly from hour to hour. But it looks like the worst we'll get is more days of overly cold weather.
Is z-wave still rolling along? I need to get a few leak sensors, so should I wait for the 5.3 betas and z-wave or search out another platform?