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

Stack traces in the turbine heat sensor sample #118

Open
fpj opened this issue Jun 18, 2018 · 0 comments
Open

Stack traces in the turbine heat sensor sample #118

fpj opened this issue Jun 18, 2018 · 0 comments

Comments

@fpj
Copy link
Contributor

fpj commented Jun 18, 2018

We have a couple of instances of printing stack traces that seem arbitrary. They don't seem to be doing anything with respect to helping the user understand what has gone wrong and what to do next. It feels like "I'm not sure what to do with it, so let me print the stack trace".

The instances I'm talking about are:
https://github.com/pravega/pravega-samples/blob/develop/scenarios/turbine-heat-sensor/src/main/java/io/pravega/turbineheatsensor/TurbineHeatSensor.java#L414
https://github.com/pravega/pravega-samples/blob/develop/scenarios/turbine-heat-sensor/src/main/java/io/pravega/turbineheatsensor/TurbineHeatSensor.java#L445

The first one is an error while writing in the context of a txn. If the write fails, then should it really keep going? The txn is in an inconsistent state and it feels like a fatal error for the application.

The second one is a reinitialization required for a reader, which happens when a reader groups is reset. We shouldn't simply print the stack trace and move on. We should either reinitialize or exit in the case that reinitializing is a problem. If it is not expected, then exiting sounds the right thing to do, but simply swallowing the exception is wrong.

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