more data to exception msgs

This commit is contained in:
fjy 2013-08-01 14:04:27 -07:00
parent 6d54ae9f81
commit 8f39db7804
2 changed files with 6 additions and 1 deletions

View File

@ -196,7 +196,10 @@ public class ServerManager implements QuerySegmentWalker
oldQueryable.close(); oldQueryable.close();
} }
catch (IOException e) { catch (IOException e) {
log.makeAlert(e, "Unable to close segment %s", segment.getIdentifier()).emit(); log.makeAlert(e, "Exception closing segment")
.addData("dataSource", dataSource)
.addData("segmentId", segment.getIdentifier())
.emit();
} }
} else { } else {
log.info( log.info(

View File

@ -129,6 +129,8 @@ public class ReferenceCountingSegmentTest
segment.increment(); segment.increment();
segment.increment(); segment.increment();
segment.increment(); segment.increment();
Assert.assertTrue(segment.getNumReferences() == 0);
segment.close(); segment.close();
Assert.assertTrue(segment.getNumReferences() == 0); Assert.assertTrue(segment.getNumReferences() == 0);
} }