Diagnosing RavenDB Problem in Production
Join the DZone community and get the full member experience.Join For Free
we have run into a problem in our production system. luckily, this is a pretty obvious case of misdirection.
take a look at the stack trace that we have discovered:
the interesting bit is that this is an “impossible” error. in fact, this is the first time that we have actually seen this error ever .
but looking at the stack trace tells us pretty much everything. the error happens in dispose, but that one is called from the constructor . because we are using native code, we need to make sure that an exception in the ctor will properly dispose all unmanaged resources.
the code looks like this:
and here we can see the probable cause for the error. we try to open a transaction, then an exception happens, and the dispose is called, but it isn’t ready to handle this scenario, so throws.
the original exception is masked, and you have a hard debug scenario.
Published at DZone with permission of Oren Eini, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.