[Info-vax] OpenVMS - DCL - Data entry filtering
Stephen Hoffman
seaohveh at hoffmanlabs.invalid
Sat Mar 28 07:58:22 EDT 2015
On 2015-03-28 04:04:43 +0000, David Froble said:
> Bob Gezelter wrote:
>> David,
>>
>> The point is that on modern systems, it is not impossible to get
>> identical filenames with the output of F$CVTIME.
>> At the very least, one needs to trap the possibility when creating a
>> file, and take appropriate action (e.g., appending index numbers).
>>
>> - Bob Gezelter, http://www.rlgsc.com
>
> Yeah, I do that. But it's rather rare, and if there are additional
> components to the filespec, it's even more rare.
Ayup. If it works for your case, go for it. But I'm posting some
caveats here because there are some less-experienced folks reading this
thread, and because different applications have different profiles.
I've seen folks bagged by using a common logging routine in a way that
differed from what its original author had intended. Or had even
conceived of, having looked at the code involved.
Mistakes I have made, or mistakes I have encountered, in other words.
> It also will depend upon the application. I don't do anything that
> spins out many files, quickly. I'm not sure what type of application
> would do that.
A lot of them these days, actually. Those that are writing gazillions
of turd files, that is.
> Sometimes what's theoretically possible and what's practically possible
> are far apart.
Undoubtedly true in your environment. But in others? Whether because
the primary app is rolling out a lot of log files due to some
unexpected spike in load or due to some gradual increase in load over
time, or because the app is operating in a cluster and multiple logs
are being started around the same time. It happens. More than I'd
like.
The calculations involved in a GUID or maintaining a sequence number
counter are inevitably masked by the glacial speed of the I/O, so being
defensive here isn't usually a problem, either.
This is also where some folks will start using a common journal file,
rather than log files. This is also where some folks use journaling
servers, because transmitting the journal data over a network to a
separate journaling server is substantially faster than writing to a
local disk. SSDs and inboard flash are tipping that performance
calculation somewhat, but... hard... disks... are... staggeringly...
slow.
> I personally find the ascending sequence of time stamps very useful.
Ayup, and it is a fine way to avoid the failures that the use of VMS
versions can cause in an application, too. I use an ascending
application-maintained counter where contention is likely. In some
applications I've worked, simply maintaining that unique index counter
value can itself be a performance bottleneck, though I'm almost never
writing out individual log files by then. At those sorts of counter
allocation rates, that's where the GUIDs or counter allocation blocks
or other approaches come into play.
--
Pure Personal Opinion | HoffmanLabs LLC
More information about the Info-vax
mailing list