| Summary: | [prefs] Preferences lost on disk full | ||
|---|---|---|---|
| Product: | [Eclipse Project] Equinox | Reporter: | John Arthorne <john.arthorne> |
| Component: | Compendium | Assignee: | John Arthorne <john.arthorne> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | major | ||
| Priority: | P3 | CC: | dj.houghton, Mike_Wilson, tjwatson |
| Version: | 3.7 | ||
| Target Milestone: | Juno M4 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
John Arthorne
Ugh. We need to do everything possible to be bulletproof in the face of problems like this. If there is metadata that is critical, it needs to be written transaction style. Yes. We have deliberately avoided investing in the server infrastructure so far. I have always thought for the server to be *real* it needs to plugin into a serious content repository for handling data persistence rather than writing something from scratch. For example we looked at Jackrabbit early on, but it felt overkill for a demo server. All I'm thinking of doing here is something as good as the Eclipse platform, which writes to a temp file first, and then renames the file if the write was successful. This helps with disk full and disk access errors while writing, but isn't true transaction semantics. I think it is best to fix this at the Equinox preference level.
Sample stack trace:
java.io.IOException: No space left on device
at java.io.FileOutputStream.writeBytes(Native Method)
at java.io.FileOutputStream.write(FileOutputStream.java:266)
at java.io.BufferedOutputStream.write(BufferedOutputStream.java:117)
at sun.nio.cs.StreamEncoder$CharsetSE.writeBytes(StreamEncoder.java:343)
at sun.nio.cs.StreamEncoder$CharsetSE.implWrite(StreamEncoder.java:404)
at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:147)
at java.io.OutputStreamWriter.emptyBuffer(OutputStreamWriter.java:279)
at java.io.OutputStreamWriter.write(OutputStreamWriter.java:240)
at java.io.Writer.write(Writer.java:152)
at java.util.Properties.store(Properties.java:590)
at org.eclipse.core.internal.preferences.EclipsePreferences.save(EclipsePreferences.java:1000)
at org.eclipse.core.internal.preferences.EclipsePreferences.save(EclipsePreferences.java:968)
at org.eclipse.core.internal.preferences.EclipsePreferences.flush(EclipsePreferences.java:353)
at org.eclipse.core.internal.preferences.EclipsePreferences.flush(EclipsePreferences.java:341)
|