Skip to content

Conversation

lutovich
Copy link
Contributor

@lutovich lutovich commented Sep 21, 2018

Database's connection ID is returned in Bolt V3 as part of HELLO message response. This PR makes driver extract the supplied ID and include it in all debug log messages. This makes it possible to trace events on the same connection between driver and database.

Example of debug log:

FINE ChannelConnectedListener - [0x77076520][] C: [Bolt Handshake] [0x6060b017, 3, 2, 1, 0]
FINE HandshakeHandler - [0x77076520][] S: [Bolt Handshake] 3
FINE OutboundMessageHandler - [0x77076520][] C: HELLO {principal="neo4j", scheme="basic", credentials="******", user_agent="neo4j-java/dev"}
FINE InboundMessageDispatcher - [0x77076520][] S: SUCCESS {server="Neo4j/3.5.0-beta01", connection_id="bolt-42"}
FINE OutboundMessageHandler - [0x77076520][bolt-42] C: RESET
FINE InboundMessageDispatcher - [0x77076520][bolt-42] S: SUCCESS {}

Here driver channel ID is 0x77076520 and database connection ID is bolt-42.

@lutovich lutovich requested a review from zhenlineo September 21, 2018 17:16
@lutovich lutovich force-pushed the 1.7-connection-id branch 3 times, most recently from 3b0291a to 6b7677d Compare September 24, 2018 14:11
Copy link
Contributor

@zhenlineo zhenlineo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG, just a small comment.

Database's connection ID is returned in Bolt V3 as part of HELLO
message response. This commit makes driver extract the supplied
ID and include it in all debug log messages. This makes it possible
to trace events on the same connection between driver and database.
Make messages include short channel id. Only creation and acquisition
messages now include network addresses.
@lutovich lutovich merged commit b428d48 into neo4j:1.7 Sep 28, 2018
@lutovich lutovich deleted the 1.7-connection-id branch September 28, 2018 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants