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();
}
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 {
log.info(

View File

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