Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
None
Description
This exception seems to be harmless, but I thought it would be a good idea to document it just in case I overlooked anything. I think it is harmless because it is thrown inside the while loop that obtains the keys ready for I/O on Factory.run(). The penalty is skipping all other keys available in the for loop that follows the select call, but since we call again select in the next interation, we don't miss much. An optimizatio, however, would be catching this exception inside the for loop to avoid the extra call to select.
2008-07-24 21:09:03,894 - ERROR - [NIOServerCxn.Factory:NIOServerCnxn$Factory@152] - FIXMSG java.nio.channels.CancelledKeyException at sun.nio.ch.SelectionKeyImpl.ensureValid(SelectionKeyImpl.java:55) at sun.nio.ch.SelectionKeyImpl.readyOps(SelectionKeyImpl.java:69) at com.yahoo.zookeeper.server.NIOServerCnxn$Factory.run(NIOServerCnxn.java:136) 2008-07-24 21:09:06,912 - ERROR - [NIOServerCxn.Factory:NIOServerCnxn$Factory@152] - FIXMSG java.nio.channels.CancelledKeyException at sun.nio.ch.SelectionKeyImpl.ensureValid(SelectionKeyImpl.java:55) at sun.nio.ch.SelectionKeyImpl.readyOps(SelectionKeyImpl.java:69) at com.yahoo.zookeeper.server.NIOServerCnxn$Factory.run(NIOServerCnxn.java:136)