Orientdb: shutdown/close do not release file locks

Created on 17 Apr 2017  路  8Comments  路  Source: orientechnologies/orientdb

OrientDB Version: 2.2.18

Java Version: 8

OS: Windows

Expected behavior

I need some way of blocking on a close / shutdown where OrientDB releases all its references to the resources. This is so that I can clean up after myself in CI.

Actual behavior

OrientDB holds locks on various files, meaning I can't clean them up, and therefore my disk grows and grows.

Steps to reproduce

Run the integration tests in https://github.com/ensime/ensime-server/pull/1747 a few times and you'll fill up your disk.

question

All 8 comments

Hi @fommil .
Which methods do you call to release files. OrientGraph#shutdwon ?

This will not work in such case. You should treat OrientGraph as a connection to the database, not as the database instance. To release locks of files you should use com.orientechnologies.orient.core.storage.OStorage#close(boolean, boolean) method. Hope it helps.

how do I obtain an OStorage instance when all I have is an OrientGraphFactory?

we call .close() on this, btw. And when we finish with any OrientBaseGraph, we call .shutdown() on it.

aaah, would this work? db.getDatabase.getStorage.close()

No this will not ))

you need to specify arguments close(true, false)

Did it work ?

yes, it did, thanks!

Was this page helpful?
0 / 5 - 0 ratings