[2.x] rocksdb backend for v2

How can modify this config to enable RocksDB backend xtdb/xtdb.edn at 2.x · xtdb/xtdb · GitHub

The old config from v1, doesn’t seem to work.

:xtdb/tx-log {:kv-store {:xtdb/module xtdb.rocksdb/->kv-store
                        :db-dir "data/tx-log"}}
 :xtdb/document-store {:kv-store {:xtdb/module xtdb.rocksdb/->kv-store
                                :db-dir "data/docs"}}
 :xtdb/index-store {:kv-store {:xtdb/module xtdb.rocksdb/->kv-store
                             :db-dir "data/indices"}}

with error

Execution error (IllegalArgumentException) at juxt.clojars-mirrors.integrant.core/try-build-action (core.cljc:304).
No method in multimethod 'init-key' for dispatch value: :xtdb/document-store

(from Github)

Hey @polynomialparody :wave:

The architecture for v2 is a little different - rather than the document-store and index-store we now just have an ‘object-store’, so RocksDB will no longer be necessary.

We’re yet to write up the documentation for anything apart from in-memory use cases, but we do have an on-disk transaction-log and document-store available - you could try the following:

(let [node-dir (io/file "/tmp/xt2")] 
  {:xtdb.log/local-directory-log {:root-path (io/file node-dir "log")} 
   :xtdb.object-store/file-system-object-store {:root-path (io/file node-dir "objects")}})

Please do bear in mind that the on-disk formats are still subject-to-change through the early access - best not to rely on backwards-compatibility or durability between snapshot versions!

Cheers,

James

3 Likes