Azure / azure-cosmosdb-java

Java Async SDK for SQL API of Azure Cosmos DB
MIT License
54 stars 61 forks source link

Direct TCP: CorruptedFrameException thrown when netty-tcnative is used #277

Closed David-Noble-at-work closed 4 years ago

David-Noble-at-work commented 5 years ago

The CorruptedFrameException is thrown by RntbdTokenType.RntbdString.computeLength and caught by RntbdRequestManager.channelRead where it is converted to a GoneException in RntbdRequestManager.exceptionCaught. In all cases that this exception has been observed, it is the result of an off-by-one error when reading string data for the SessionToken header. This condition is detected when RntbdTokenType sees that the number of readable bytes in the current input buffer is one less than the length of SessionToken string to be read.