Page 1 of 1

Cumulus is busy flag?

Posted: Sat 20 Nov 2021 3:03 pm
by g0gcd
Hi,
I'm just starting my conversion from Cumulus1 to Cumulus MX. I have background activities triggered by Cumulus 1 that include processes which read, copy, move and write to Cumulus internal files. I have, therefore, a process which checks for the word "Uploading" on the console. If present, the background processes wait for Cumulus to finish its work before proceeding.
Is there something similar in MX to indicate that datafile processing is in progress?
Thanks
John

Re: Cumulus is busy flag?

Posted: Sat 20 Nov 2021 4:17 pm
by mcrossley
No, most the file operations in CMX are now conducted asynchronously, and there is no feedback on when they complete.

Re: Cumulus is busy flag?

Posted: Sat 20 Nov 2021 6:58 pm
by g0gcd
Thanks Mark.
Need to tread very cautiously in this endeavour then!
There's a number of approaches I can try in order to work out when it's safe to intervene, but none as neat as being explicitly told "you are good to go!"
I appreciate the rapid reply.
Take care
John

Re: Cumulus is busy flag?

Posted: Sat 20 Nov 2021 7:16 pm
by mcrossley
Open the files read-only and in shared mode whenever possible. The latest version of CMX does retry the file writes if they fail first time.

Re: Cumulus is busy flag?

Posted: Mon 22 Nov 2021 10:43 am
by g0gcd
Thanks for the steer Mark,
I'm experimenting with reading MX's CPU usage... it rises above negligible whenever it's busy. The MX logs also give information about when the upload processes begin and end (both realtime and full update), so interrogating those may also help. It's clear, however, that MX only uploads for 1 or 2 seconds compared with C1s 10 seconds to 90 seconds, so a simple wait may be sufficient to clear any problems. My main concern is my process which zips the MmmYYLog.txt file, to add it to an 'archive' page of my own, which needs to avoid the point at which MX is writing to it. I'm also looking to see if Windows has an efficient way of detecting that MX has the file 'in use'. Yet another way may be to take a copy of the file and zip up the copy... so many avenues yet to explore.
It's good to know that MX retries the write if I do collide but I'd rather try to avoid that happening - leaving MX retries as the disaster recovery that it's intended to be.
Once again, thanks for your time helping me on what seems to be a relatively unique way of doing things.
Regards
John
www.nn14.co.uk