Skip to content

Commit

Permalink
Remove bolt message logging as it is not used
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhen Li authored and zhenlineo committed Aug 5, 2018
1 parent 8084373 commit 94b1b4c
Show file tree
Hide file tree
Showing 54 changed files with 103 additions and 1,565 deletions.
12 changes: 1 addition & 11 deletions community/bolt/src/main/java/org/neo4j/bolt/BoltChannel.java
Expand Up @@ -23,7 +23,6 @@

import java.net.SocketAddress;

import org.neo4j.bolt.logging.BoltMessageLogger;
import org.neo4j.kernel.api.net.TrackedNetworkConnection;

/**
Expand All @@ -35,30 +34,22 @@ public class BoltChannel implements AutoCloseable, TrackedNetworkConnection, Bol
private final long connectTime;
private final String connector;
private final Channel rawChannel;
private final BoltMessageLogger messageLogger;

private volatile String user;

public BoltChannel( String id, String connector, Channel rawChannel, BoltMessageLogger messageLogger )
public BoltChannel( String id, String connector, Channel rawChannel )
{
this.id = id;
this.connectTime = System.currentTimeMillis();
this.connector = connector;
this.rawChannel = rawChannel;
this.messageLogger = messageLogger;
messageLogger.serverEvent( "OPEN" );
}

public Channel rawChannel()
{
return rawChannel;
}

public BoltMessageLogger log()
{
return messageLogger;
}

@Override
public String id()
{
Expand Down Expand Up @@ -107,7 +98,6 @@ public void close()
Channel rawChannel = rawChannel();
if ( rawChannel.isOpen() )
{
messageLogger.serverEvent( "CLOSE" );
rawChannel.close().syncUninterruptibly();
}
}
Expand Down
13 changes: 5 additions & 8 deletions community/bolt/src/main/java/org/neo4j/bolt/BoltServer.java
Expand Up @@ -25,7 +25,6 @@
import java.time.Clock;
import java.util.Map;

import org.neo4j.bolt.logging.BoltMessageLogging;
import org.neo4j.bolt.runtime.BoltConnectionFactory;
import org.neo4j.bolt.runtime.BoltConnectionReadLimiter;
import org.neo4j.bolt.runtime.BoltSchedulerProvider;
Expand Down Expand Up @@ -113,8 +112,6 @@ public void start() throws Throwable
Log userLog = logService.getUserLog( BoltServer.class );

InternalLoggerFactory.setDefaultFactory( new Netty4LoggerFactory( logService.getInternalLogProvider() ) );
BoltMessageLogging boltLogging = BoltMessageLogging.create( fs, jobScheduler, config, log );
life.add( boltLogging );

Authentication authentication = createAuthentication();

Expand All @@ -131,7 +128,7 @@ public void start() throws Throwable
if ( !config.enabledBoltConnectors().isEmpty() && !config.get( GraphDatabaseSettings.disconnected ) )
{
NettyServer server = new NettyServer( jobScheduler.threadFactory( boltNetworkIO ),
createConnectors( boltProtocolFactory, throttleGroup, boltLogging, log ), connectorPortRegister, userLog );
createConnectors( boltProtocolFactory, throttleGroup, log ), connectorPortRegister, userLog );
life.add( server );
log.info( "Bolt server loaded" );
}
Expand All @@ -155,15 +152,15 @@ private BoltConnectionFactory createConnectionFactory( Config config, BoltSchedu
}

private Map<BoltConnector,ProtocolInitializer> createConnectors( BoltProtocolFactory boltProtocolFactory,
TransportThrottleGroup throttleGroup, BoltMessageLogging boltLogging, Log log )
TransportThrottleGroup throttleGroup, Log log )
{
return config.enabledBoltConnectors()
.stream()
.collect( toMap( identity(), connector -> createProtocolInitializer( connector, boltProtocolFactory, throttleGroup, boltLogging, log ) ) );
.collect( toMap( identity(), connector -> createProtocolInitializer( connector, boltProtocolFactory, throttleGroup, log ) ) );
}

private ProtocolInitializer createProtocolInitializer( BoltConnector connector, BoltProtocolFactory boltProtocolFactory,
TransportThrottleGroup throttleGroup, BoltMessageLogging boltLogging, Log log )
TransportThrottleGroup throttleGroup, Log log )
{
SslContext sslCtx;
boolean requireEncryption;
Expand Down Expand Up @@ -199,7 +196,7 @@ private ProtocolInitializer createProtocolInitializer( BoltConnector connector,
}

ListenSocketAddress listenAddress = config.get( connector.listen_address );
return new SocketTransport( connector.key(), listenAddress, sslCtx, requireEncryption, logService.getInternalLogProvider(), boltLogging,
return new SocketTransport( connector.key(), listenAddress, sslCtx, requireEncryption, logService.getInternalLogProvider(),
throttleGroup, boltProtocolFactory, connectionTracker );
}

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit 94b1b4c

Please sign in to comment.