I ran into a problem while trying to use the in-memory xtdb-core dependency in my app. I think it may be because I'm using the latest versions of reitit and ring, which pull a newer version of jetty than what xtdb-core is expecting? Maybe I'm missing something here. I made a minimal version of the app that demonstrates the problem https://github.com/mattiuusitalo/xtdb-problem
this is missing some of the required jvm arguments. Let me check if that fixes it
You'll also need to add the following JVM arguments to run Apache Arrow (included in the :xtdb deps.edn alias above):
--add-opens=java.base/java.nio=ALL-UNNAMED
-Dio.netty.tryReflectionSetAccessible=trueDoesn't seem like it. I added the jvm opts and it has the same problem still
Hi, thanks for sharing the repro. You could probably try excluding Jetty (assuming you're not wanting to expose any ports) by doing something similar to this https://github.com/xtdb/xtdb/issues/4172#issuecomment-2661042404
Thanks, I will give this a shot
yep. we tried to bump ours recently but there were a few breaking changes, it wasn't a straightforward bump so admittedly I moved on to the next thing π
we have a dependabot pr open for it, will add it to our board
Thanks
hello π
I've run into a weird issue with xtql (from ... (with... query working on docs created on the same day, but the following day the same query does not work as it worked the day before - missing the subquery result. π³
Hi @pt.roterski I just briefly wanted to let you know that we are (I am) still planning to look into this soon. Thanks for your patience!
ah, thanks, no rush, itβs not critical for me as in I can navigate around it, and I understand I dropped this just before the easter weekend. I just wanted to help in case thatβs some real issue, and not just my messed up setup. btw Iβm creating those docs in a missionary flow if that makes any difference but I thought it shouldnβt since Iβm calling it via standard xtdb.api
thanks for trying to help!
I'm able to reproduce it pretty reliably - I use my app, creating those conversation-completion pairs, the query works, I go to sleep and the next day the query doesn't work anymore for old entires but works for the ones created on the same day.
It happened to me 3rd day in the row. Yesterday, I wiped the data dir clean, so now I'm able to share it https://github.com/roterski/xtdb2-from-query-issue-debug - /data is added there to the repo, it contains single conversation entity and single completion - from query joining them does not work as it works on "fresh" data.
I wiped the db clean (copied it into different dir actually) because it eventually ran into memory leak errors, let me paste them below:
just checked it with sql equivalent and it has the same issue
(defn get-conversation-with-completion-sql
[node conversation-id]
(xt/q node
["SELECT _id, last_completion_id, created_at,
NEST_MANY(SELECT completions._id, completions.requested_at, completions.responded_at
FROM completions
WHERE completions._id = last_completion_id)
AS last_completion
FROM conversations
WHERE _id = ?"
conversation-id]))
(comment
(get-conversation-with-completion-sql xtdb-node "2025-04-17_06-46_effervescent-indigo-turtle__UNMZfDQoHOc")
;;=> [{:xt/id "2025-04-17_06-46_effervescent-indigo-turtle__UNMZfDQoHOc",
;; :last-completion-id #uuid "0bafcdc3-fa5e-49cb-a158-fab5f2bd438e",
;; :created-at #xt/zoned-date-time "2025-04-17T06:46:47.469518Z[UTC]",
;; :last-completion
;; [{:requested-at #xt/zoned-date-time "2025-04-17T06:46:50.447Z[UTC]",
;; :responded-at #xt/zoned-date-time "2025-04-17T06:46:54.644Z[UTC]",
;; :xt/id #uuid "0bafcdc3-fa5e-49cb-a158-fab5f2bd438e"}]}]
(get-conversation-with-completion-sql xtdb-node "2025-04-16_21-05_heavenly-pyramidal-wombat_DV1uZ6gqpZ_J1")
;;=> [{:xt/id "2025-04-16_21-05_heavenly-pyramidal-wombat_DV1uZ6gqpZ_J1",
;; :last-completion-id #uuid "4e650baa-0c7c-4da8-9032-7b1e57eb91a2",
;; :created-at #xt/zoned-date-time "2025-04-16T21:05:12.490378Z[UTC]"}]
)hey @pt.roterski π have you got a dataset you could share here? (will try to generate one)
I doubt there's anything special in the data there other then what I've posted in the snippet - two tables, with one foreign key linking two docs, the thing to reproduce is that ~1 day after creation this link stops working in this query. I can't share this entire dataset as it has a lot llm junk attached to it but I could try reproducing it on minimalized dataset when I get a chance over the weekend - in what format would you want me to share it?
thanks @pt.roterski π tbh, as you have above is good - I can paste that straight into a test case π
ok, let me know if you have any problems reproducing it π
sorry - as in, I haven't been able to repro it so far - have you got some (e.g.) submit-txs/execute-txs?
I've not been able to repro this in Play either (also https://play.xtdb.com/?version=2.0.0-beta6&type=sql-v2&enc=2&txs=NobwRAzgnhAuCmBbAtLAlo%2BYBcA7ArgDaEA0YsAHhDmAJIByAygKIBKAKgAQPsDynAYwD2uAG7wAThACG6ERE6tmAYV6sAIowA6uEAH00AE2ycA5ACYADOYCsySwBZkARgDseywDZkDz3vgAZgGS4hAC8LiwyGi4hmgA5kKo%2BBKwhPB6egCq9ACyAFoB6gCKQgASvAKmJDqchNJwesKIAA7pcrgGxpxZWbTqZpYARtIBAoYCAMzIAdI28D4AnAJDyNLONgAcM9JDNgHmQ4YOk5vw1bUCEvCy8IZ6sibstLnMjOwAgrkACmZWtvYnG52F5sL4wa4AHS%2BRY2ZybfKmAC%2BAG4dAwWBxuPQ%2BIIhK12mh5IoVGpNDoQNcIC0RIY7g9YE8Xm9Pj8-tY7I4XK4QZ4wXybA5IZ4HA5ETVcJxrgBHfDwOD0x6cZ6vd5fX4WDmA7m8-nYGyWaEOVzi2pdEy9fqDEZjCbTWbzJYrNYbbazPYHI4nM7IlFgJEkcCyyRQGiwCRysBkSjUbBgFgAGRUXC6JDqDVgTXxbXgHVTgmut3usglnDL5YrZfoLL0uQ%2B9AAmgAKRPJvEE3NE3AQSH55o5jo9mVyhXF2Bp-uE%2BSQqk02KK2C1SvLlcVgBirF4uXbA67ECXq8PFYA6mU2Mwd1Pu72jJwALzpxqTzsiLoASgPh4%2BjEfmefHU-VcNy3PExEkGRB0AldT3PTgunvdkAS5NwPG8Xx-CCEJ5XCSJoliBIklgFI0gybI8kKEpykqUx-QAXSAA) π€ did you restart your container between yesterday and today? is there anything interesting in the logs?
small update, after updating to beta7, removing protobuf exclusion and updating clojurescript and shadow-cljs to latest versions, this querying issue no longer appears!
I suspect it had something to do with :patch-docs running on separate m/blk missionary thread because I had a different problem (throwing java.lang.RuntimeException: Unrecognized date/time syntax: +294247-01-10T04:00:54.775807000-00:00 ) that happened only when I ran tests via kaocha (and not via repl) but I have replaced patch-docs with put-docs and it no longer happens. Everything works now.
Ah, brilliant, glad to hear! Thanks for letting us know :)