Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fun Times With Booleans #11

Open
joinr opened this issue Jun 3, 2024 · 0 comments
Open

Fun Times With Booleans #11

joinr opened this issue Jun 3, 2024 · 0 comments

Comments

@joinr
Copy link

joinr commented Jun 3, 2024

I ran into the fascinating case, where a boolean false was truthy according to clojure. Specifically, only when running on a node on the cluster (evaluating a task with some maps that were serialized as part of the task). The net effect is:

user> (if (java.lang.Boolean. false) "this should never occur" "this should always occur")
"this should never occur"

On the thread where the input map was created (with some boolean values), everything is fine. On cluster though, I am guessing that the serialization process invokes (java.lang.Boolean. false) instead of using the specific java.lang.Boolean/FALSE (which clojure seems to expect). This manifested in a filter using :Enabled allowing items with {:Enabled false} to pass, when invoked on a cluster peer.

Any ideas on how to work around this at the serialization level? From what I saw, all your stuff just uses the default Serializable interface and ships stuff over the wire. I have a specific fix for this case, but I wonder if there is a general alteration to the serialization path that can catch this.

Relevant thread:

https://groups.google.com/g/cascading-user/c/6N99titgkjY?pli=1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant