Closed seancorfield closed 3 years ago
I have a test that reproduces this. I'm trying to decide whether it's really a bug or an inherent problem per Expected behavior above.
This is the stacktrace for the exceptions from this case:
next.jdbc.result_set.MapResultSetBuilder.with_column (result_set.clj:197)
next.jdbc.result_set$row_builder$fn__3077.invoke (result_set.clj:435)
clojure.lang.LongRange.reduce (LongRange.java:233)
clojure.core$reduce.invokeStatic (core.clj:6829)
clojure.core$reduce.invoke (core.clj:6812)
next.jdbc.result_set$row_builder.invokeStatic (result_set.clj:435)
next.jdbc.result_set$row_builder.invoke (result_set.clj:431)
next.jdbc.result_set$mapify_result_set$reify__3148.seq (result_set.clj:565)
clojure.lang.APersistentMap$KeySeq.createFromMap (APersistentMap.java:150)
clojure.lang.RT.keys (RT.java:622)
clojure.core$keys.invokeStatic (core.clj:1561)
clojure.core$keys.invoke (core.clj:1557)
next.jdbc_test$fn__4749$keys_fn__4750.invoke (jdbc_test.clj:825)
This happens in the completing arity of partition-by
, which runs after the reduce
has handed off the result (and therefore closed the result set).
I will update the documentation to add a caveat about this.
Describe the bug Using a stateful transducer with a completing function can throw result set closed exceptions.
To Reproduce TBD
Expected behavior Not sure. Is this an inherent problem with
IReduceInit
collections that manage their own resources?Stacktraces n/a
project.clj/deps.edn n/a
Environment (please complete the following information): n/a
Additional context n/a