Skip to content

Fix Issue #13: Prevent PGEX file corruption due to insufficient disk …#49

Open
traybug23 wants to merge 1 commit intoPathVisio:mainfrom
traybug23:fix-for-pgex-disk-space-issue-13
Open

Fix Issue #13: Prevent PGEX file corruption due to insufficient disk …#49
traybug23 wants to merge 1 commit intoPathVisio:mainfrom
traybug23:fix-for-pgex-disk-space-issue-13

Conversation

@traybug23
Copy link

This PR adds disk space validation before attempting to create new database files. It shows an user friendly error message instead of failing silently
Changes Made:

  1. New utility class: DiskSpaceValidator
    i - It checks available disk space on the target partition
    ii - Also, it includes 10 MB safety margin to prevent any edge cases
    iii - It provides human-readable space information for error messags.

  2. Modified DBConnDerby.java
    i - A disk space check was added before creating GDB/GEX files.
    ii -It shows user friendly error dialog when space is insufficient.
    iii - It usesconservative size estimates like 100 MB for GDB and 50 MB for GEX.

  3. DiskValidatorTest to check test conditions for the DiskSpaceValidaor
    i - It tests normal as well as some edge cases.
    ii - Tests safety margin handling, null handling and non existent file handling

Testing Results:

All unit tests pass:
Time: 0.069
OK (7 tests)

Manually tested on Windows with low disk space scenarios.

Best Regards,
Snehashree Prusty. (traybug23)
@mkutmon

…ent disk space

- Added DiskSpaceValidator utility class to check available disk space
- Modified DBConnDerby to validate space before creating GDB/GEX files
- Added comprehensive unit tests for disk space validation
- Uses conservative 10MB safety margin to prevent edge cases
- Provides user-friendly error dialog when disk space is insufficient for student computers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments