private void updateLastCommitInfo(EncodedDataStream dataStream, bool generatingKeys) { generatedKeys = null; // From v2 - v6, gen keys were sent before last commit info if (connection.InternalConnection.protocolVersion >= Protocol.PROTOCOL_VERSION2 && connection.InternalConnection.protocolVersion < Protocol.PROTOCOL_VERSION7 && generatingKeys) { generatedKeys = createResultSet(dataStream, true); } // from v3 -v6, last commit info was not being sent if there was a gen key result set if ((connection.InternalConnection.protocolVersion >= Protocol.PROTOCOL_VERSION3 && !generatingKeys) || connection.InternalConnection.protocolVersion >= Protocol.PROTOCOL_VERSION7) { long transactionId = dataStream.getLong(); int nodeId = dataStream.getInt(); long commitSequence = dataStream.getLong(); connection.InternalConnection.setLastTransaction(transactionId, nodeId, commitSequence); } // from v7 gen key result set is sent after last commit info (if at all) if (connection.InternalConnection.protocolVersion >= Protocol.PROTOCOL_VERSION7 && generatingKeys) { generatedKeys = createResultSet(dataStream, true); } }