Fork me on GitHub
#xtdb
<
2022-08-31
>
Hukka13:08:52

Is @(:closed? node) part of public API, that is, can we rely on that to keep existing in our lifecycle methods? Trying to check if the node is closed and needs to be reopened

refset14:08:16

Not exactly 🙂 it would be safer to call status and catch the IllegalStateException https://github.com/xtdb/xtdb/blob/6fb56faaa612b68ba1d6c84c6323bfde26358b7a/core/src/xtdb/node.clj#L34

Hukka15:08:59

That seems a bit dirty 😕

refset15:08:18

Fair. I mean you can probably really on that atom without too much worry. Maybe add a test for it to repo just in case there ever is a breaking change?

Hukka18:08:31

I went with the exception. I think the tests would have been uglier, instead of using a solution that should keep working

refset21:08:30

Cool, glad I could help. Sorry it wasn't more aesthetically pleasant 😄