orientechnologies / orientdb

OrientDB is the most versatile DBMS supporting Graph, Document, Reactive, Full-Text and Geospatial models in one Multi-Model product. OrientDB can run distributed (Multi-Master), supports SQL, ACID Transactions, Full-Text indexing and Reactive Queries.
https://orientdb.dev
Apache License 2.0
4.76k stars 871 forks source link

disable WAL for plocal database #9840

Open fabriziofortino opened 2 years ago

fabriziofortino commented 2 years ago

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:

Am I doing anything wrong there? Is there any way to programmatically force to NOT use the WAL?

Thanks!

lvca commented 2 years ago

Hey, @fabriziofortino still using OrientDB? Nice to see you around. Have you looked at ArcadeDB? :-)

fabriziofortino commented 2 years ago

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.

tglman commented 2 years ago

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