db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mamta A. Satoor (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DERBY-5232) Put a stern README file in log and seg0 directories to warn users of corrpution they will cause if they touch files there
Date Tue, 06 Nov 2012 03:44:12 GMT

     [ https://issues.apache.org/jira/browse/DERBY-5232?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Mamta A. Satoor updated DERBY-5232:

    Attachment: DERBY5232_patch6_stat.txt

Knut, thanks for reviewing the last patch. I am submitting patch #6. This patch is same as
the previous one except a prototype change in RawStore where we create the readme file for
seg0 directory. 

In this patch, in RawStore, now I am mimicking what we do for storing services.properties
ie write the warning text in the readme file using a Properties object. This gets rid of extra
bytes at the beginning of the readme file with the earlier patch. One thing to note though
is that with using the Properties object to write the text, the current date time stamp gets
appended at the end of the warning text. I think having date time stamp should not be an issue.

With this patch, I do not see any formatting errors with newline on my windows machine. 

If we are ok with using Properties object, then I will go ahead and make similar change to
the code for readme files at the database level and at log directory. 

I am also working on writing a junit test which will check if the 3 readme files get created
at the end of database creation. Please let me know if there is any feedback on using Properties
object to write the text into readme files. Thanks
> 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:
>            Reporter: Kathey Marsden
>            Assignee: Mamta A. Satoor
>             Fix For:
>         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, DERBY5232_patch5_diff.txt, DERBY5232_patch5_stat.txt, DERBY5232_patch6_diff.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:
> 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

View raw message