0

From their getting started

(defn start-xtdb! []
  (letfn [(kv-store [dir]
            {:kv-store {:xtdb/module 'xtdb.rocksdb/->kv-store
                        :db-dir (io/file dir)
                        :sync? true}})]
    (xt/start-node
     {:xtdb/tx-log (kv-store "data/dev/tx-log")
      :xtdb/document-store (kv-store "data/dev/doc-store")
      :xtdb/index-store (kv-store "data/dev/index-store")})))

(def xtdb-node (start-xtdb!))

(defn stop-xtdb! []
  (.close xtdb-node))

Upon starting the node, it throws

Execution error (RocksDBException) at org.rocksdb.RocksDB/open (RocksDB.java:-2).
lock hold by current process, acquire time 1649604606 acquiring thread 123145548206080: 

/Users/faiz.halde/Workspace/personal/data/proj/data/dev/index-store/LOCK: No locks available

Even tried deleting the data directory

CLJ - 1.10.3
openjdk version "1.8.0_292"
ffff
  • 2,853
  • 1
  • 25
  • 44

2 Answers2

0

I ignore the cause of the problem. But I restarted the REPL and it worked.

  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jun 21 '22 at 06:28
0

This usually indicates that you still have an active node running, because a RocksDB instance can only be access by one node at a time, however if you lose the reference to the original node then you can't shut it down directly and I believe the only option then is to restart the JVM.