arcadedb icon indicating copy to clipboard operation
arcadedb copied to clipboard

Cannot delete file used for database import

Open dijef opened this issue 1 year ago • 0 comments

ArcadeDB Version:

24.5.1, embedded installation (I believe it applies to server too)

OS and JDK Version:

Windows 11, Adoptium 21.0.1+12

Expected behavior

After import from file completes, I expect process to close file streams so I can delete it.

Actual behavior

After import from file completes, file is in use and cannot be deleted. It may apply to other formats than 'graphson' also.

Steps to reproduce

Import attached file: db_20240606t103727.gz

Must rename the file from db_20240606t103727.gz to db_20240606t103727.graphson (it does not detect format correctly otherwise) after download.

Use code written below:

Database db = null; // define local database here
Path path = Paths.get(path_to_file);
db.begin();
new com.arcadedb.integration.importer.Importer(db, path.toString()).load();

I reach same behaviour when using SQL IMPORT and EXPORT statement, however I use direct Java API as I need control over the file.

dijef avatar Jun 06 '24 11:06 dijef