hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Shelukhin <ser...@hortonworks.com>
Subject using production asserts
Date Thu, 06 Dec 2012 18:26:06 GMT
In the previous projects, I got used to using production (cheap) asserts
all over the code to verify strictly internal state (e.g., random example,
we take a buffer out of "buffers to flush" pool and it still has writers
attached - how did it end up in this pool? we don't know what's going on
If such thing happens the process would force crash (no exception handling
will save it), writing a dump and debug info according to configuration.
That serves well to detect bugs early, and to be more confident about what
the code is doing (and not write code that tries to account for unknwon
bugs in other code) :)
Although it does increase the number of crashes potentially, if enabled;
and can be misuses if someone uses it for external conditions.

I notice there's no such practice in HBase codebase... was it rejected at
some point, or just never used?
I wonder if it would be a good idea for me to look at some Java options for
that, and introduce it for people who might want to give it a try.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message