From 02f08750174e271a115c758ad9853755082406bb Mon Sep 17 00:00:00 2001 From: Moses E Miles III Date: Sat, 1 Oct 2022 07:44:54 -0400 Subject: [PATCH 01/10] Add command to check for outdated deps --- .gitignore | 2 ++ deps.edn | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index fab6a3e..a3f38ff 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,5 @@ pom.xml.asc .nrepl-port .cpcache/ *.iml +.clj-kondo/.cache +.lsp/.cache \ No newline at end of file diff --git a/deps.edn b/deps.edn index 6ba4f68..30d17f4 100644 --- a/deps.edn +++ b/deps.edn @@ -8,4 +8,9 @@ kaocha-noyoda/kaocha-noyoda {:mvn/version "2019-06-03"} lambdaisland/kaocha-junit-xml {:mvn/version "0.0.76"} ch.qos.logback/logback-classic {:mvn/version "1.2.3"} - org.clojure/test.check {:mvn/version "0.10.0"}}}}} + org.clojure/test.check {:mvn/version "0.10.0"}}} + :outdated {:extra-deps {com.github.liquidz/antq {:mvn/version "2.1.932"} + org.apache.logging.log4j/log4j-slf4j-impl {:mvn/version "2.19.0"} + org.apache.logging.log4j/log4j-core {:mvn/version "2.19.0"} + org.slf4j/slf4j-simple {:mvn/version "2.0.3"}} + :main-opts ["-m" "antq.core"]}}} From 8acc35d79610384cc7e6844a32424e4521312ff8 Mon Sep 17 00:00:00 2001 From: Moses E Miles III Date: Sat, 1 Oct 2022 07:54:02 -0400 Subject: [PATCH 02/10] Update clojure and test dependencies --- bin/kaocha | 2 +- deps.edn | 10 +++++----- pom.xml | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/bin/kaocha b/bin/kaocha index 11ae7cf..265e88a 100755 --- a/bin/kaocha +++ b/bin/kaocha @@ -1,2 +1,2 @@ #!/usr/bin/env sh -clojure -A:test -m kaocha.runner "$@" +clojure -M:test -m kaocha.runner "$@" diff --git a/deps.edn b/deps.edn index 30d17f4..eac44a2 100644 --- a/deps.edn +++ b/deps.edn @@ -1,14 +1,14 @@ {:paths ["src"] - :deps {org.clojure/clojure {:mvn/version "1.10.0"} + :deps {org.clojure/clojure {:mvn/version "1.11.1"} juxt/crux-core {:mvn/version "20.09-1.12.0-beta"} org.jetbrains.xodus/xodus-openAPI {:mvn/version "1.3.232"} org.jetbrains.xodus/xodus-environment {:mvn/version "1.3.232"}} :aliases {:test {:extra-paths ["test"] - :extra-deps {lambdaisland/kaocha {:mvn/version "1.0.669"} + :extra-deps {lambdaisland/kaocha {:mvn/version "1.70.1086"} kaocha-noyoda/kaocha-noyoda {:mvn/version "2019-06-03"} - lambdaisland/kaocha-junit-xml {:mvn/version "0.0.76"} - ch.qos.logback/logback-classic {:mvn/version "1.2.3"} - org.clojure/test.check {:mvn/version "0.10.0"}}} + lambdaisland/kaocha-junit-xml {:mvn/version "1.16.98"} + ch.qos.logback/logback-classic {:mvn/version "1.4.1"} + org.clojure/test.check {:mvn/version "1.1.1"}}} :outdated {:extra-deps {com.github.liquidz/antq {:mvn/version "2.1.932"} org.apache.logging.log4j/log4j-slf4j-impl {:mvn/version "2.19.0"} org.apache.logging.log4j/log4j-core {:mvn/version "2.19.0"} diff --git a/pom.xml b/pom.xml index 5e4a97b..268ef3e 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ org.clojure clojure - 1.10.0 + 1.11.1 org.jetbrains.xodus From 7e231e6277a29c2e3990dce234c9191d5cbb5ddf Mon Sep 17 00:00:00 2001 From: Moses E Miles III Date: Sat, 1 Oct 2022 07:59:17 -0400 Subject: [PATCH 03/10] Update to latest version of crux prior to the transition to xtdb --- deps.edn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps.edn b/deps.edn index eac44a2..88c9695 100644 --- a/deps.edn +++ b/deps.edn @@ -1,6 +1,6 @@ {:paths ["src"] :deps {org.clojure/clojure {:mvn/version "1.11.1"} - juxt/crux-core {:mvn/version "20.09-1.12.0-beta"} + juxt/crux-core {:mvn/version "21.06-1.17.1-beta"} org.jetbrains.xodus/xodus-openAPI {:mvn/version "1.3.232"} org.jetbrains.xodus/xodus-environment {:mvn/version "1.3.232"}} :aliases {:test {:extra-paths ["test"] From 65a5925737d776021f483c05c714cf5c082c66f6 Mon Sep 17 00:00:00 2001 From: Moses E Miles III Date: Sat, 1 Oct 2022 08:06:12 -0400 Subject: [PATCH 04/10] Update to pro.juxt.crux group name --- deps.edn | 2 +- pom.xml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/deps.edn b/deps.edn index 88c9695..ad45cfd 100644 --- a/deps.edn +++ b/deps.edn @@ -1,6 +1,6 @@ {:paths ["src"] :deps {org.clojure/clojure {:mvn/version "1.11.1"} - juxt/crux-core {:mvn/version "21.06-1.17.1-beta"} + pro.juxt.crux/crux-core {:mvn/version "1.18.2"} org.jetbrains.xodus/xodus-openAPI {:mvn/version "1.3.232"} org.jetbrains.xodus/xodus-environment {:mvn/version "1.3.232"}} :aliases {:test {:extra-paths ["test"] diff --git a/pom.xml b/pom.xml index 268ef3e..7715027 100644 --- a/pom.xml +++ b/pom.xml @@ -22,9 +22,9 @@ 1.3.232 - juxt + pro.juxt.crux crux-core - 20.09-1.12.0-beta + 1.18.2 From e40555338c136b02a0f90e5a60aec93253e580ba Mon Sep 17 00:00:00 2001 From: Moses E Miles III Date: Sat, 1 Oct 2022 08:24:34 -0400 Subject: [PATCH 05/10] Update to initial crux->xtdb version --- .gitignore | 3 ++- deps.edn | 2 +- pom.xml | 6 +++--- src/avisi/crux/xodus.clj | 6 +++--- test/avisi/crux/kv/xodus_test.clj | 14 +++++++------- 5 files changed, 16 insertions(+), 15 deletions(-) diff --git a/.gitignore b/.gitignore index a3f38ff..1b18837 100644 --- a/.gitignore +++ b/.gitignore @@ -13,4 +13,5 @@ pom.xml.asc .cpcache/ *.iml .clj-kondo/.cache -.lsp/.cache \ No newline at end of file +.lsp/.cache +.calva/output-window/output.calva-repl \ No newline at end of file diff --git a/deps.edn b/deps.edn index ad45cfd..46f8575 100644 --- a/deps.edn +++ b/deps.edn @@ -1,6 +1,6 @@ {:paths ["src"] :deps {org.clojure/clojure {:mvn/version "1.11.1"} - pro.juxt.crux/crux-core {:mvn/version "1.18.2"} + com.xtdb/xtdb-core {:mvn/version "1.19.0"} org.jetbrains.xodus/xodus-openAPI {:mvn/version "1.3.232"} org.jetbrains.xodus/xodus-environment {:mvn/version "1.3.232"}} :aliases {:test {:extra-paths ["test"] diff --git a/pom.xml b/pom.xml index 7715027..2de3c48 100644 --- a/pom.xml +++ b/pom.xml @@ -22,9 +22,9 @@ 1.3.232 - pro.juxt.crux - crux-core - 1.18.2 + com.xtdb + xtdb-core + 1.19.0 diff --git a/src/avisi/crux/xodus.clj b/src/avisi/crux/xodus.clj index 59c77e3..3f3a2ce 100644 --- a/src/avisi/crux/xodus.clj +++ b/src/avisi/crux/xodus.clj @@ -1,7 +1,7 @@ (ns avisi.crux.xodus - (:require [crux.kv :as kv] - [crux.system :as sys] - [crux.memory :as mem]) + (:require [xtdb.kv :as kv] + [xtdb.system :as sys] + [xtdb.memory :as mem]) (:import [java.io Closeable] [jetbrains.exodus.env Environments Environment Store StoreConfig Transaction Cursor TransactionalExecutable] [jetbrains.exodus ArrayByteIterable ByteIterable])) diff --git a/test/avisi/crux/kv/xodus_test.clj b/test/avisi/crux/kv/xodus_test.clj index aa0ea39..54bf23e 100644 --- a/test/avisi/crux/kv/xodus_test.clj +++ b/test/avisi/crux/kv/xodus_test.clj @@ -3,19 +3,19 @@ [clojure.test.check.clojure-test :as tcct] [clojure.test.check.generators :as gen] [clojure.test.check.properties :as prop] - [crux.codec :as c] - [crux.kv :as kv] - [crux.memory :as mem] - [crux.io :as cio] + [xtdb.codec :as c] + [xtdb.kv :as kv] + [xtdb.memory :as mem] + [xtdb.io :as cio] [avisi.crux.xodus :as xodus] - [crux.system :as sys] - [crux.api :as crux] + [xtdb.system :as sys] + [xtdb.api :as xtdb] [clojure.java.io :as io]) (:import [org.agrona.concurrent UnsafeBuffer] [java.nio ByteOrder])) (def ^:dynamic *kv*) -(def ^:dynamic *kv-opts* {:crux/module `xodus/->kv-store, :db-dir-suffix "xodus"}) +(def ^:dynamic *kv-opts* {:xtdb/module `xodus/->kv-store, :db-dir-suffix "xodus"}) (defn with-kv-store* [f] (let [db-dir (cio/create-tmpdir "kv-store")] From be4005e0e8f969b1d36243e18cad8bfef2e76775 Mon Sep 17 00:00:00 2001 From: Moses E Miles III Date: Sat, 1 Oct 2022 08:26:35 -0400 Subject: [PATCH 06/10] Update to xtdb version 1.22.0 --- deps.edn | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deps.edn b/deps.edn index 46f8575..b0ffa9c 100644 --- a/deps.edn +++ b/deps.edn @@ -1,6 +1,6 @@ {:paths ["src"] :deps {org.clojure/clojure {:mvn/version "1.11.1"} - com.xtdb/xtdb-core {:mvn/version "1.19.0"} + com.xtdb/xtdb-core {:mvn/version "1.22.0"} org.jetbrains.xodus/xodus-openAPI {:mvn/version "1.3.232"} org.jetbrains.xodus/xodus-environment {:mvn/version "1.3.232"}} :aliases {:test {:extra-paths ["test"] diff --git a/pom.xml b/pom.xml index 2de3c48..93e764d 100644 --- a/pom.xml +++ b/pom.xml @@ -24,7 +24,7 @@ com.xtdb xtdb-core - 1.19.0 + 1.22.0 From ce176dd51133b70c01c15dd8eb0e79378981db63 Mon Sep 17 00:00:00 2001 From: Moses E Miles III Date: Sat, 1 Oct 2022 08:36:28 -0400 Subject: [PATCH 07/10] Update xodus to version 2.0.1 --- .vscode/settings.json | 3 +++ deps.edn | 4 ++-- pom.xml | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..c5f3f6b --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "java.configuration.updateBuildConfiguration": "interactive" +} \ No newline at end of file diff --git a/deps.edn b/deps.edn index b0ffa9c..1dfbd66 100644 --- a/deps.edn +++ b/deps.edn @@ -1,8 +1,8 @@ {:paths ["src"] :deps {org.clojure/clojure {:mvn/version "1.11.1"} com.xtdb/xtdb-core {:mvn/version "1.22.0"} - org.jetbrains.xodus/xodus-openAPI {:mvn/version "1.3.232"} - org.jetbrains.xodus/xodus-environment {:mvn/version "1.3.232"}} + org.jetbrains.xodus/xodus-openAPI {:mvn/version "2.0.1"} + org.jetbrains.xodus/xodus-environment {:mvn/version "2.0.1"}} :aliases {:test {:extra-paths ["test"] :extra-deps {lambdaisland/kaocha {:mvn/version "1.70.1086"} kaocha-noyoda/kaocha-noyoda {:mvn/version "2019-06-03"} diff --git a/pom.xml b/pom.xml index 93e764d..2f16724 100644 --- a/pom.xml +++ b/pom.xml @@ -14,12 +14,12 @@ org.jetbrains.xodus xodus-openAPI - 1.3.232 + 2.0.1 org.jetbrains.xodus xodus-environment - 1.3.232 + 2.0.1 com.xtdb From 2efccb0f735590df5b0868c16968231384bd1e86 Mon Sep 17 00:00:00 2001 From: Moses E Miles III Date: Sat, 1 Oct 2022 09:42:24 -0400 Subject: [PATCH 08/10] Update readme to XTDB --- README.md | 26 ++++++++++++++------------ pom.xml | 2 +- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 08ad9e4..6e7fdeb 100644 --- a/README.md +++ b/README.md @@ -1,44 +1,46 @@ # crux-xodus +Crux has been renamed to XTDB. + [![Clojars Project](https://img.shields.io/clojars/v/avisi-apps/crux-xodus.svg)](https://clojars.org/avisi-apps/crux-xodus) -[Crux](https://github.com/juxt/crux) Currently supports LMDB and RocksDB, but we wanted a pure Java solution so we created a [Xodus](https://github.com/JetBrains/xodus)-backed KV store. +[XTDB](https://github.com/xtdb/xtdb) Currently supports LMDB and RocksDB, but we wanted a pure Java solution so we created a [Xodus](https://github.com/JetBrains/xodus)-backed KV store. # Usage -If you want to quickly try it out you should follow the [Official Crux installation](https://opencrux.com/reference/). +If you want to quickly try it out you should follow the [Official XTDB installation](https://xtdb.com/docs/). ## Add a dependency Make sure to first add this module as a dependency: [![Clojars Project](https://img.shields.io/clojars/v/avisi-apps/crux-xodus.svg)](https://clojars.org/avisi-apps/crux-xodus) -## Configure Crux +## Configure XTDB And after that you can change the KV backend to the Xodus one: **EDN** ```clojure -{:crux/index-store {:kv-store {:crux/module 'avisi.crux.xodus/->kv-store +{:xtdb/index-store {:kv-store {:xtdb/module 'avisi.crux.xodus/->kv-store :db-dir (io/file "/tmp/xodus")}} - :crux/document-store {...} - :crux/tx-log {...}} + :xtdb/document-store {...} + :xtdb/tx-log {...}} ``` **JSON** ```json { - "crux/index-store": { + "xtdb/index-store": { "kv-store": { - "crux/module": "avisi.crux.xodus/->kv-store", + "xtdb/module": "avisi.crux.xodus/->kv-store", "db-dir": "/tmp/xodus" } }, - - "crux/document-store": { ... }, - "crux/tx-log": { ... } + + "xtdb/document-store": { ... }, + "xtdb/tx-log": { ... } } ``` -For more information about configuring Crux see: https://opencrux.com/reference/configuration.html +For more information about configuring XTDB see: https://docs.xtdb.com/administration/configuring/ # Developer diff --git a/pom.xml b/pom.xml index 2f16724..e03321a 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 avisi-apps crux-xodus - 1.1.0 + 2.0.0 crux-xodus From 3e853c6c8edeacb6415d702f0e11415340cebf77 Mon Sep 17 00:00:00 2001 From: Moses E Miles III Date: Sat, 1 Oct 2022 09:46:18 -0400 Subject: [PATCH 09/10] Update name and paths to xtdb-xodus --- README.md | 2 +- pom.xml | 2 +- src/avisi/{crux => xtdb}/xodus.clj | 2 +- test/avisi/{crux => xtdb}/kv/xodus_test.clj | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) rename src/avisi/{crux => xtdb}/xodus.clj (99%) rename test/avisi/{crux => xtdb}/kv/xodus_test.clj (99%) diff --git a/README.md b/README.md index 6e7fdeb..031d1a4 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# crux-xodus +# xtdb-xodus Crux has been renamed to XTDB. diff --git a/pom.xml b/pom.xml index e03321a..13a86ae 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ avisi-apps crux-xodus 2.0.0 - crux-xodus + xtdb-xodus org.clojure diff --git a/src/avisi/crux/xodus.clj b/src/avisi/xtdb/xodus.clj similarity index 99% rename from src/avisi/crux/xodus.clj rename to src/avisi/xtdb/xodus.clj index 3f3a2ce..a731d06 100644 --- a/src/avisi/crux/xodus.clj +++ b/src/avisi/xtdb/xodus.clj @@ -1,4 +1,4 @@ -(ns avisi.crux.xodus +(ns avisi.xtdb.xodus (:require [xtdb.kv :as kv] [xtdb.system :as sys] [xtdb.memory :as mem]) diff --git a/test/avisi/crux/kv/xodus_test.clj b/test/avisi/xtdb/kv/xodus_test.clj similarity index 99% rename from test/avisi/crux/kv/xodus_test.clj rename to test/avisi/xtdb/kv/xodus_test.clj index 54bf23e..077885b 100644 --- a/test/avisi/crux/kv/xodus_test.clj +++ b/test/avisi/xtdb/kv/xodus_test.clj @@ -1,4 +1,4 @@ -(ns avisi.crux.kv.xodus-test +(ns avisi.xtdb.kv.xodus-test (:require [clojure.test :as t] [clojure.test.check.clojure-test :as tcct] [clojure.test.check.generators :as gen] @@ -7,7 +7,7 @@ [xtdb.kv :as kv] [xtdb.memory :as mem] [xtdb.io :as cio] - [avisi.crux.xodus :as xodus] + [avisi.xtdb.xodus :as xodus] [xtdb.system :as sys] [xtdb.api :as xtdb] [clojure.java.io :as io]) From 2648e2def158debb4a8ae63a0e29f2ddbff71ee1 Mon Sep 17 00:00:00 2001 From: Moses E Miles III Date: Tue, 4 Oct 2022 21:03:16 -0400 Subject: [PATCH 10/10] Remove ide specific config --- .gitignore | 4 +--- .vscode/settings.json | 3 --- 2 files changed, 1 insertion(+), 6 deletions(-) delete mode 100644 .vscode/settings.json diff --git a/.gitignore b/.gitignore index 1b18837..0e37294 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,4 @@ pom.xml.asc .nrepl-port .cpcache/ *.iml -.clj-kondo/.cache -.lsp/.cache -.calva/output-window/output.calva-repl \ No newline at end of file +.clj-kondo/.cache \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index c5f3f6b..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "java.configuration.updateBuildConfiguration": "interactive" -} \ No newline at end of file