[
https://issues.apache.org/jira/browse/DERBY-5232?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13487622#comment-13487622
]
Knut Anders Hatlen commented on DERBY-5232:
-------------------------------------------
For the record, I also see the problem with missing files when running from
classes, not just with the jars.
The logic in RawStore.createDataWarningFile() seems to be backward. That is, it
only attempts to create the file if it already exists.
Also, I don't think it's correct to use actionCode = REGULAR_FILE_EXISTS_ACTION
in privRandomAccessFile(), as that action will return a Boolean rather than a
StorageRandomAccessFile and probably result in a ClassCastException.
Some other nits:
After fixing the typos, the asterisks around the text don't line up nicely
anymore.
There are some garbage bytes at the beginning of the readme files. I think this
is because the writeUTF() method writes length information before the actual
text. See javadoc for java.io.DataOutput#writeUTF(). It would be good if the
readme files were pure text files.
> Put a stern README file in log and seg0 directories to warn users of
> corrpution they will cause if they touch files there
> -------------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-5232
> URL: https://issues.apache.org/jira/browse/DERBY-5232
> Project: Derby
> Issue Type: Improvement
> Components: Store
> Affects Versions: 10.8.1.2
> Reporter: Kathey Marsden
> Assignee: Mamta A. Satoor
> Fix For: 10.10.0.0
>
> Attachments: DERBY5232_patch1_diff.txt, DERBY5232_patch1_stat.txt,
> DERBY5232_patch2_diff.txt, DERBY5232_patch2_stat.txt,
> DERBY5232_patch3_diff.txt, DERBY5232_patch3_stat.txt,
> DERBY5232_patch4_diff.txt, DERBY5232_patch4_stat.txt
>
>
> Users often on bad advice or desperation touch or delete files in the log or
> seg0 directories (mostly log).
> I think it would be good for new databases and on upgrade that a file be
> created in these directories with a name like:
> TOUCHING_FILES_HERE_WILL_CORRUPT_DB_README.txt
> or some such to warn of the perils of doing this and the corrupting effects
> and how it can eliminate any possibility of salvage. It should also encourage
> users to make a zip backup of the database directory with no jvm currently
> accessing it before trying to do anything with the database if it appears to
> be already corrupt. Also point to backup/restore documentation and encourage
> restore of a good backup into an empty directory if the database is corrupt.
> I'm not sure if it would help but it couldn't hurt.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira