orientdb
orientdb copied to clipboard
disable WAL for plocal database
OrientDB Version: 3.2.7
Java Version: 11
OS: Mac OSx
I have a plocal database as part of a Kotlin application. I would like to disable the WAL journal but I still see the WAL file growing in the db folder.
Here is my code:
private val orientGraphFactory = OrientGraphFactory("plocal:.databases/graph-repo-$id")
.setupPool(1, 10)
.also {
it.setUseLightweightEdges(true)
val db = it.database
db.createEdgeClass("child")
val node = db.createVertexClass("Node")
node.createProperty("_path", OType.STRING).createIndex(OClass.INDEX_TYPE.UNIQUE_HASH_INDEX)
node.createProperty("_pType", OType.STRING)
}
I tried the following:
- start the app using
-Dstorage.useWAL=false
- add a call to
OGlobalConfiguration.USE_WAL.setValue(false)
before db init code
Am I doing anything wrong there? Is there any way to programmatically force to NOT use the WAL?
Thanks!
Hey, @fabriziofortino still using OrientDB? Nice to see you around. Have you looked at ArcadeDB? :-)
hey @lvca long time! I had a look at ArcadeDB a few months ago and it looks interesting. I am building a small prototype and I need a graph db to validate some assumptions. I picked Orient because I am more familiar with it.
Hi,
As today in 3.2.x is not possible to disable the WAL, just because it would break a few more features of OrientDB, like incremental backup, distributed partial sync, even if you are ok to loose the durability, It may be possible to do a mock implementation of the WAL that would allow to run this functionality and disable the logging of changes but is not yet implemented.
Also as today disable the WAL has less impact than in the past, the transaction isolation that has the biggest cost in terms of write operations as today would be still active even if the WAL was disabled, in versions previous 3.0 not using the WAL would disable also some isolation and the relative cost.
Regards