mdsplus
mdsplus copied to clipboard
Define behavior of mdsplus8 editing 12-char trees
Affiliation MID PSFC
Description Presently, when mdsplus8 edits 12-char trees, it does in-memory conversion to the 63-char format, and then truncates back to 12-char format when writing the edited tree to disk. This results in workflows that are confusing to users. We need to define what the behavior should be and if/when error messages should be displayed to the user.
Example Some ideas that have been suggested . . .
- mdsplus8 editing 63-char trees should only write 63-char trees
- mdsplus8 editing 12-char trees should a) only allow 12-char node names and b) only write 12-char trees
- alternatively, mdsplus8 editing 12-char trees by adding / renaming to long node names, should throw an error if attempt to write 12-char trees and instead only allow writing 63-char trees
- or perhaps use a two step process: a) use mdsplus8 to read 12-char tree and write to disk as a 63-char tree, and then b) re-open the 63-char tree and allow editing plus writing as a 63-char trees
- another possibility is to throw an error whenever editing a 12-char tree and add a long node name
- if do allow adding long node names, then when truncate back to 12-char format (for writing to disk), must ensure that truncation did not result in any duplicate node names
- a minor detail is that in 12-char trees there is no trailing null character on the longest possible node names, however in 63-char trees all node names (including the longest possible) always have a null character
- new error codes should probably be defined for the various special errors that can arise when mdsplus8 edits 12-char trees
Additional context Refer to Issue #2690 for an example of the problems that can arise when mdsplus8 edits 12-char trees.
There are also issues if mdsplus v7 (and earlier) attempt to edit 63-char trees. For more details, see Issue #2590.