You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If :onyx/max-peers is set for the partition table task, but :onyx/n-peers is not, the task will break with the NullPointerException that is rather hard to track since it happens within the function passed to vreset!.
;; Partition up the partitions over all n-peers.
(take-nth (:onyx/n-peers task-map)
(drop slot-id
(map (fn [[l h]]
[l (dec (or h (inc n-max)))])
ranges)))
Could become this:
;; Partition up the partitions over all n-peers.
(take-nth (or (:onyx/n-peers task-map) (:onyx/max-peers task-map))
(drop slot-id
(map (fn [[l h]]
[l (dec (or h (inc n-max)))])
ranges)))
The text was updated successfully, but these errors were encountered:
Given the way it partitions the data, I think the only real fix here is to throw when onyx/n-peers is not used. Given the partitioning scheme, I think the number of peers needs to be stable.
If
:onyx/max-peers
is set for the partition table task, but:onyx/n-peers
is not, the task will break with theNullPointerException
that is rather hard to track since it happens within the function passed tovreset!
.The docs in the
README.md
should either state clearly:onyx/n-peers
is a required parameter for this task, oronyx.plugin.sql/partition-table
should fall back to using:onyx/max-peers
if:onyx/n-peers
isnil
. This fix could be applied here: https://github.com/onyx-platform/onyx-sql/blob/0.13.x/src/onyx/plugin/sql.clj#L70.E.g. this:
Could become this:
The text was updated successfully, but these errors were encountered: