diff --git a/community/bolt/src/main/java/org/neo4j/bolt/runtime/DefaultBoltConnection.java b/community/bolt/src/main/java/org/neo4j/bolt/runtime/DefaultBoltConnection.java index 16163dd3dbd98..2ff242bcbcb53 100644 --- a/community/bolt/src/main/java/org/neo4j/bolt/runtime/DefaultBoltConnection.java +++ b/community/bolt/src/main/java/org/neo4j/bolt/runtime/DefaultBoltConnection.java @@ -217,17 +217,22 @@ private boolean processNextBatch( int batchCount ) @Override public void handleSchedulingError( Throwable t ) { + String message; Neo4jError error; if ( ExceptionUtils.hasCause( t, RejectedExecutionException.class ) ) { error = Neo4jError.from( Status.Request.NoThreadsAvailable, Status.Request.NoThreadsAvailable.code().description() ); + message = String.format( "Unable to schedule bolt session '%s' for execution since there are no available threads to " + + "serve it at the moment. You can retry at a later time or consider increasing max pool / queue size for bolt connector(s).", id() ); } else { error = Neo4jError.fatalFrom( t ); + message = String.format( "Unexpected error during scheduling of bolt session '%s'.", id() ); } - userLog.error( String.format( "Unexpected error during scheduling of bolt session '%s'.", id() ), t ); + log.error( message, t ); + userLog.error( message ); machine.markFailed( error ); processNextBatch( 1 ); } diff --git a/community/bolt/src/main/java/org/neo4j/bolt/transport/DefaultBoltProtocolHandlerFactory.java b/community/bolt/src/main/java/org/neo4j/bolt/transport/DefaultBoltProtocolHandlerFactory.java index e31e13468e27c..2c63be4e1fe6d 100644 --- a/community/bolt/src/main/java/org/neo4j/bolt/transport/DefaultBoltProtocolHandlerFactory.java +++ b/community/bolt/src/main/java/org/neo4j/bolt/transport/DefaultBoltProtocolHandlerFactory.java @@ -20,15 +20,13 @@ package org.neo4j.bolt.transport; import org.neo4j.bolt.BoltChannel; +import org.neo4j.bolt.runtime.BoltConnection; +import org.neo4j.bolt.runtime.BoltConnectionFactory; import org.neo4j.bolt.v1.messaging.Neo4jPack; import org.neo4j.bolt.v1.messaging.Neo4jPackV1; import org.neo4j.bolt.v1.transport.BoltMessagingProtocolHandlerImpl; import org.neo4j.bolt.v2.messaging.Neo4jPackV2; -import org.neo4j.bolt.runtime.BoltConnection; -import org.neo4j.bolt.runtime.BoltConnectionFactory; -import org.neo4j.bolt.runtime.BoltConnectionReadLimiter; import org.neo4j.kernel.impl.logging.LogService; -import org.neo4j.logging.Log; public class DefaultBoltProtocolHandlerFactory implements BoltProtocolHandlerFactory { diff --git a/community/bolt/src/test/java/org/neo4j/bolt/runtime/integration/BoltSchedulerIT.java b/community/bolt/src/test/java/org/neo4j/bolt/runtime/integration/BoltSchedulerIT.java index bf3deb2e55f8e..1afd3490add96 100644 --- a/community/bolt/src/test/java/org/neo4j/bolt/runtime/integration/BoltSchedulerIT.java +++ b/community/bolt/src/test/java/org/neo4j/bolt/runtime/integration/BoltSchedulerIT.java @@ -19,9 +19,6 @@ */ package org.neo4j.bolt.runtime.integration; -import org.apache.commons.text.CharacterPredicates; -import org.apache.commons.text.RandomStringGenerator; -import org.junit.After; import org.junit.Before; import org.junit.Rule; import org.junit.Test; @@ -30,7 +27,7 @@ import org.junit.runners.Parameterized; import java.util.ArrayList; -import java.util.Collection; +import java.util.Arrays; import java.util.List; import java.util.Map; import java.util.Random; @@ -38,24 +35,19 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; import java.util.function.Consumer; -import java.util.function.Supplier; +import org.neo4j.bolt.AbstractBoltTransportsTest; +import org.neo4j.bolt.v1.messaging.Neo4jPack; +import org.neo4j.bolt.v1.messaging.Neo4jPackV1; import org.neo4j.bolt.v1.transport.integration.Neo4jWithSocket; -import org.neo4j.bolt.v1.transport.integration.TransportTestUtil; -import org.neo4j.bolt.v1.transport.socket.client.SecureSocketConnection; -import org.neo4j.bolt.v1.transport.socket.client.SecureWebSocketConnection; -import org.neo4j.bolt.v1.transport.socket.client.SocketConnection; import org.neo4j.bolt.v1.transport.socket.client.TransportConnection; -import org.neo4j.bolt.v1.transport.socket.client.WebSocketConnection; import org.neo4j.cypher.result.QueryResult; import org.neo4j.graphdb.factory.GraphDatabaseSettings; import org.neo4j.helpers.HostnamePort; import org.neo4j.kernel.configuration.BoltConnector; -import org.neo4j.logging.AssertableLogProvider; import org.neo4j.test.TestGraphDatabaseFactory; import org.neo4j.test.rule.fs.EphemeralFileSystemRule; -import static java.util.Arrays.asList; import static java.util.Collections.emptyMap; import static org.hamcrest.CoreMatchers.any; import static org.hamcrest.MatcherAssert.assertThat; @@ -66,16 +58,15 @@ import static org.neo4j.bolt.v1.messaging.util.MessageMatchers.msgRecord; import static org.neo4j.bolt.v1.messaging.util.MessageMatchers.msgSuccess; import static org.neo4j.bolt.v1.transport.integration.Neo4jWithSocket.DEFAULT_CONNECTOR_KEY; -import static org.neo4j.bolt.v1.transport.integration.TransportTestUtil.chunk; import static org.neo4j.bolt.v1.transport.integration.TransportTestUtil.eventuallyReceives; @RunWith( Parameterized.class ) -public class BoltSchedulerIT +public class BoltSchedulerIT extends AbstractBoltTransportsTest { private final int numberOfWriters = 20; private final int numberOfReaders = 50; - private final int numberOfIterations = 10; - private AssertableLogProvider logProvider; + private final int numberOfIterations = 5; + private EphemeralFileSystemRule fsRule = new EphemeralFileSystemRule(); private Neo4jWithSocket server = new Neo4jWithSocket( getClass(), getTestGraphDatabaseFactory(), fsRule::get, getSettingsFunction() ); private Random rndSleep = new Random(); @@ -83,28 +74,12 @@ public class BoltSchedulerIT @Rule public RuleChain ruleChain = RuleChain.outerRule( fsRule ).around( server ); - @Parameterized.Parameter - public Supplier connectionCreator; - private HostnamePort address; private AtomicInteger idCounter = new AtomicInteger(); - @Parameterized.Parameters - public static Collection> transports() - { - return asList( () -> new SecureSocketConnection(), () -> new SocketConnection(), () -> new SecureWebSocketConnection(), - () -> new WebSocketConnection() ); - } - protected TestGraphDatabaseFactory getTestGraphDatabaseFactory() { - TestGraphDatabaseFactory factory = new TestGraphDatabaseFactory(); - - logProvider = new AssertableLogProvider(); - - factory.setInternalLogProvider( logProvider ); - - return factory; + return new TestGraphDatabaseFactory(); } protected Consumer> getSettingsFunction() @@ -126,12 +101,6 @@ public void setup() throws Exception address = server.lookupDefaultConnector(); } - @After - public void after() throws Exception - { - - } - @Test public void readerAndWritersShouldWork() throws Exception { @@ -141,12 +110,12 @@ public void readerAndWritersShouldWork() throws Exception { for ( int i = 0; i < numberOfReaders; i++ ) { - readers.add( performHandshake( connectionCreator.get() ) ); + readers.add( performHandshake( connectionClass.newInstance() ) ); } for ( int i = 0; i < numberOfWriters; i++ ) { - writers.add( performHandshake( connectionCreator.get() ) ); + writers.add( performHandshake( connectionClass.newInstance() ) ); } List> allRequests = new ArrayList<>(); @@ -180,11 +149,11 @@ public void readerAndWritersShouldWork() throws Exception private TransportConnection performHandshake( TransportConnection connection ) throws Exception { - connection.connect( address ).send( TransportTestUtil.acceptedVersions( 1, 0, 0, 0 ) ).send( - TransportTestUtil.chunk( init( "TestClient/1.1", emptyMap() ) ) ); + connection.connect( address ).send( util.acceptedVersions( 1, 0, 0, 0 ) ).send( + util.chunk( init( "TestClient/1.1", emptyMap() ) ) ); assertThat( connection, eventuallyReceives( new byte[]{0, 0, 0, 1} ) ); - assertThat( connection, eventuallyReceives( msgSuccess() ) ); + assertThat( connection, util.eventuallyReceives( msgSuccess() ) ); return connection; } @@ -198,25 +167,25 @@ private void performWriteQueries( TransportConnection connection, int numberOfIt int id = idCounter.incrementAndGet(); String label = "LABEL"; - connection.send( chunk( run( "BEGIN" ) ) ); - assertThat( connection, eventuallyReceives( msgSuccess() ) ); - connection.send( chunk( pullAll() ) ); - assertThat( connection, eventuallyReceives( msgSuccess() ) ); + connection.send( util.chunk( run( "BEGIN" ) ) ); + assertThat( connection, util.eventuallyReceives( msgSuccess() ) ); + connection.send( util.chunk( pullAll() ) ); + assertThat( connection, util.eventuallyReceives( msgSuccess() ) ); - connection.send( chunk( run( String.format( "CREATE (n:%s { id: %d })", label, id ) ) ) ); - assertThat( connection, eventuallyReceives( msgSuccess() ) ); - connection.send( chunk( pullAll() ) ); - assertThat( connection, eventuallyReceives( msgSuccess() ) ); + connection.send( util.chunk( run( String.format( "CREATE (n:%s { id: %d })", label, id ) ) ) ); + assertThat( connection, util.eventuallyReceives( msgSuccess() ) ); + connection.send( util.chunk( pullAll() ) ); + assertThat( connection, util.eventuallyReceives( msgSuccess() ) ); - connection.send( chunk( run( "COMMIT" ) ) ); - assertThat( connection, eventuallyReceives( msgSuccess() ) ); - connection.send( chunk( pullAll() ) ); - assertThat( connection, eventuallyReceives( msgSuccess() ) ); + connection.send( util.chunk( run( "COMMIT" ) ) ); + assertThat( connection, util.eventuallyReceives( msgSuccess() ) ); + connection.send( util.chunk( pullAll() ) ); + assertThat( connection, util.eventuallyReceives( msgSuccess() ) ); Thread.sleep( rndSleep.nextInt( 1000 ) ); - connection.send( chunk( reset() ) ); - assertThat( connection, eventuallyReceives( msgSuccess() ) ); + connection.send( util.chunk( reset() ) ); + assertThat( connection, util.eventuallyReceives( msgSuccess() ) ); } } catch ( Exception ex ) @@ -233,25 +202,25 @@ private void performReadQueries( TransportConnection connection, int numberOfIte { String label = "LABEL"; - connection.send( chunk( run( "BEGIN" ) ) ); - assertThat( connection, eventuallyReceives( msgSuccess() ) ); - connection.send( chunk( pullAll() ) ); - assertThat( connection, eventuallyReceives( msgSuccess() ) ); + connection.send( util.chunk( run( "BEGIN" ) ) ); + assertThat( connection, util.eventuallyReceives( msgSuccess() ) ); + connection.send( util.chunk( pullAll() ) ); + assertThat( connection, util.eventuallyReceives( msgSuccess() ) ); - connection.send( chunk( run( String.format( "MATCH (n:%s) RETURN COUNT(n)", label ) ) ) ); - assertThat( connection, eventuallyReceives( msgSuccess() ) ); - connection.send( chunk( pullAll() ) ); - assertThat( connection, eventuallyReceives( msgRecord( any( QueryResult.Record.class ) ), msgSuccess() ) ); + connection.send( util.chunk( run( String.format( "MATCH (n:%s) RETURN COUNT(n)", label ) ) ) ); + assertThat( connection, util.eventuallyReceives( msgSuccess() ) ); + connection.send( util.chunk( pullAll() ) ); + assertThat( connection, util.eventuallyReceives( msgRecord( any( QueryResult.Record.class ) ), msgSuccess() ) ); - connection.send( chunk( run( "COMMIT" ) ) ); - assertThat( connection, eventuallyReceives( msgSuccess() ) ); - connection.send( chunk( pullAll() ) ); - assertThat( connection, eventuallyReceives( msgSuccess() ) ); + connection.send( util.chunk( run( "COMMIT" ) ) ); + assertThat( connection, util.eventuallyReceives( msgSuccess() ) ); + connection.send( util.chunk( pullAll() ) ); + assertThat( connection, util.eventuallyReceives( msgSuccess() ) ); Thread.sleep( rndSleep.nextInt( 1000 ) ); - connection.send( chunk( reset() ) ); - assertThat( connection, eventuallyReceives( msgSuccess() ) ); + connection.send( util.chunk( reset() ) ); + assertThat( connection, util.eventuallyReceives( msgSuccess() ) ); Thread.sleep( rndSleep.nextInt( 1000 ) ); } diff --git a/community/bolt/src/test/java/org/neo4j/bolt/runtime/integration/BoltSchedulerShouldReportFailureWhenBusyIT.java b/community/bolt/src/test/java/org/neo4j/bolt/runtime/integration/BoltSchedulerShouldReportFailureWhenBusyIT.java index 6d3746cf74601..13dd9f7c8484b 100644 --- a/community/bolt/src/test/java/org/neo4j/bolt/runtime/integration/BoltSchedulerShouldReportFailureWhenBusyIT.java +++ b/community/bolt/src/test/java/org/neo4j/bolt/runtime/integration/BoltSchedulerShouldReportFailureWhenBusyIT.java @@ -19,7 +19,7 @@ */ package org.neo4j.bolt.runtime.integration; -import org.junit.After; +import org.hamcrest.CoreMatchers; import org.junit.Before; import org.junit.Rule; import org.junit.Test; @@ -27,21 +27,15 @@ import org.junit.runner.RunWith; import org.junit.runners.Parameterized; -import java.util.Collection; import java.util.Map; -import java.util.concurrent.CompletableFuture; import java.util.concurrent.Future; +import java.util.concurrent.RejectedExecutionException; import java.util.function.Consumer; -import java.util.function.Supplier; +import org.neo4j.bolt.AbstractBoltTransportsTest; +import org.neo4j.bolt.runtime.BoltConnection; import org.neo4j.bolt.v1.transport.integration.Neo4jWithSocket; -import org.neo4j.bolt.v1.transport.integration.TransportTestUtil; -import org.neo4j.bolt.v1.transport.socket.client.SecureSocketConnection; -import org.neo4j.bolt.v1.transport.socket.client.SecureWebSocketConnection; -import org.neo4j.bolt.v1.transport.socket.client.SocketConnection; import org.neo4j.bolt.v1.transport.socket.client.TransportConnection; -import org.neo4j.bolt.v1.transport.socket.client.WebSocketConnection; -import org.neo4j.function.Predicates; import org.neo4j.graphdb.factory.GraphDatabaseSettings; import org.neo4j.helpers.HostnamePort; import org.neo4j.helpers.collection.MapUtil; @@ -53,8 +47,10 @@ import org.neo4j.test.rule.concurrent.OtherThreadRule; import org.neo4j.test.rule.fs.EphemeralFileSystemRule; -import static java.util.Arrays.asList; import static java.util.Collections.emptyMap; +import static org.hamcrest.CoreMatchers.containsString; +import static org.hamcrest.CoreMatchers.isA; +import static org.hamcrest.CoreMatchers.startsWith; import static org.hamcrest.MatcherAssert.assertThat; import static org.neo4j.bolt.v1.messaging.message.InitMessage.init; import static org.neo4j.bolt.v1.messaging.message.PullAllMessage.pullAll; @@ -62,13 +58,13 @@ import static org.neo4j.bolt.v1.messaging.util.MessageMatchers.msgFailure; import static org.neo4j.bolt.v1.messaging.util.MessageMatchers.msgSuccess; import static org.neo4j.bolt.v1.transport.integration.Neo4jWithSocket.DEFAULT_CONNECTOR_KEY; -import static org.neo4j.bolt.v1.transport.integration.TransportTestUtil.chunk; import static org.neo4j.bolt.v1.transport.integration.TransportTestUtil.eventuallyReceives; @RunWith( Parameterized.class ) -public class BoltSchedulerShouldReportFailureWhenBusyIT +public class BoltSchedulerShouldReportFailureWhenBusyIT extends AbstractBoltTransportsTest { - private AssertableLogProvider logProvider; + private AssertableLogProvider internalLogProvider = new AssertableLogProvider(); + private AssertableLogProvider userLogProvider = new AssertableLogProvider(); private EphemeralFileSystemRule fsRule = new EphemeralFileSystemRule(); private Neo4jWithSocket server = new Neo4jWithSocket( getClass(), getTestGraphDatabaseFactory(), fsRule::get, getSettingsFunction() ); @@ -79,26 +75,11 @@ public class BoltSchedulerShouldReportFailureWhenBusyIT @Rule public OtherThreadRule spawnedUpdate2 = new OtherThreadRule<>(); - @Parameterized.Parameter - public Supplier connectionCreator; - - private HostnamePort address; - - @Parameterized.Parameters - public static Collection> transports() - { - return asList( () -> new SecureSocketConnection(), () -> new SocketConnection(), () -> new SecureWebSocketConnection(), - () -> new WebSocketConnection() ); - } - protected TestGraphDatabaseFactory getTestGraphDatabaseFactory() { TestGraphDatabaseFactory factory = new TestGraphDatabaseFactory(); - - logProvider = new AssertableLogProvider(); - - factory.setInternalLogProvider( logProvider ); - + factory.setInternalLogProvider( internalLogProvider ); + factory.setUserLogProvider( userLogProvider ); return factory; } @@ -115,25 +96,14 @@ protected Consumer> getSettingsFunction() }; } - @Before - public void setup() throws Exception - { - address = server.lookupDefaultConnector(); - } - - @After - public void after() throws Exception - { - - } - @Test public void shouldReportFailureWhenAllThreadsInThreadPoolAreBusy() throws Exception { - TransportConnection connection1 = performHandshake( connectionCreator.get() ); - TransportConnection connection2 = performHandshake( connectionCreator.get() ); - TransportConnection connection3 = performHandshake( connectionCreator.get() ); - TransportConnection connection4 = performHandshake( connectionCreator.get() ); + address = server.lookupDefaultConnector(); + TransportConnection connection1 = performHandshake( newConnection() ); + TransportConnection connection2 = performHandshake( newConnection() ); + TransportConnection connection3 = performHandshake( newConnection() ); + TransportConnection connection4 = performHandshake( newConnection() ); // Generate a Lock createNode( connection1, 100 ); @@ -147,37 +117,41 @@ public void shouldReportFailureWhenAllThreadsInThreadPoolAreBusy() throws Except spawnedUpdate1.get().awaitStartExecuting(); spawnedUpdate2.get().awaitStartExecuting(); - connection4.send( chunk( run( "RETURN 1" ), pullAll() ) ); + connection4.send( util.chunk( run( "RETURN 1" ), pullAll() ) ); assertThat( connection4, - eventuallyReceives( msgFailure( Status.Request.NoThreadsAvailable, "There is no available thread to serve this request at the moment" ), - msgFailure( Status.Request.NoThreadsAvailable, "There is no available thread to serve this request at the moment" ) ) ); + util.eventuallyReceives( msgFailure( Status.Request.NoThreadsAvailable, "There are no available threads to serve this request at the moment" ), + msgFailure( Status.Request.NoThreadsAvailable, "There are no available threads to serve this request at the moment" ) ) ); + + userLogProvider.assertContainsMessageContaining( "since there are no available threads to serve it at the moment. You can retry at a later time" ); + internalLogProvider.assertAtLeastOnce( AssertableLogProvider.inLog( startsWith( BoltConnection.class.getPackage().getName() ) ).error( + containsString( "since there are no available threads to serve it at the moment. You can retry at a later time" ), + isA( RejectedExecutionException.class ) ) ); } private TransportConnection performHandshake( TransportConnection connection ) throws Exception { - connection.connect( address ).send( TransportTestUtil.acceptedVersions( 1, 0, 0, 0 ) ).send( - TransportTestUtil.chunk( init( "TestClient/1.1", emptyMap() ) ) ); + connection.connect( address ).send( util.acceptedVersions( 1, 0, 0, 0 ) ).send( util.chunk( init( "TestClient/1.1", emptyMap() ) ) ); assertThat( connection, eventuallyReceives( new byte[]{0, 0, 0, 1} ) ); - assertThat( connection, eventuallyReceives( msgSuccess() ) ); + assertThat( connection, util.eventuallyReceives( msgSuccess() ) ); return connection; } private void createNode( TransportConnection connection, int id ) throws Exception { - connection.send( TransportTestUtil.chunk( run( "BEGIN" ), pullAll(), run( "CREATE (n { id: {id} })", ValueUtils.asMapValue( MapUtil.map( "id", id ) ) ), - pullAll(), run( "COMMIT" ), pullAll() ) ); + connection.send( util.chunk( run( "BEGIN" ), pullAll(), run( "CREATE (n { id: {id} })", ValueUtils.asMapValue( MapUtil.map( "id", id ) ) ), pullAll(), + run( "COMMIT" ), pullAll() ) ); - assertThat( connection, eventuallyReceives( msgSuccess(), msgSuccess(), msgSuccess(), msgSuccess(), msgSuccess(), msgSuccess() ) ); + assertThat( connection, util.eventuallyReceives( msgSuccess(), msgSuccess(), msgSuccess(), msgSuccess(), msgSuccess(), msgSuccess() ) ); } private void updateNode( TransportConnection connection, int oldId, int newId ) throws Exception { - connection.send( TransportTestUtil.chunk( run( "BEGIN" ), pullAll(), + connection.send( util.chunk( run( "BEGIN" ), pullAll(), run( "MATCH (n { id: {oldId} }) SET n.id = {newId}", ValueUtils.asMapValue( MapUtil.map( "oldId", oldId, "newId", newId ) ) ), pullAll() ) ); - assertThat( connection, eventuallyReceives( msgSuccess(), msgSuccess(), msgSuccess(), msgSuccess() ) ); + assertThat( connection, util.eventuallyReceives( msgSuccess(), msgSuccess(), msgSuccess(), msgSuccess() ) ); } private int updateNodeNoThrow( TransportConnection connection, int oldId, int newId ) diff --git a/community/bolt/src/test/java/org/neo4j/bolt/transport/DefaultBoltProtocolHandlerFactoryTest.java b/community/bolt/src/test/java/org/neo4j/bolt/transport/DefaultBoltProtocolHandlerFactoryTest.java index e710477815246..9682129db3475 100644 --- a/community/bolt/src/test/java/org/neo4j/bolt/transport/DefaultBoltProtocolHandlerFactoryTest.java +++ b/community/bolt/src/test/java/org/neo4j/bolt/transport/DefaultBoltProtocolHandlerFactoryTest.java @@ -25,15 +25,14 @@ import org.neo4j.bolt.BoltChannel; import org.neo4j.bolt.logging.NullBoltMessageLogger; -import org.neo4j.bolt.v1.messaging.Neo4jPackV1; import org.neo4j.bolt.runtime.BoltConnection; import org.neo4j.bolt.runtime.BoltConnectionFactory; +import org.neo4j.bolt.v1.messaging.Neo4jPackV1; import org.neo4j.bolt.v2.messaging.Neo4jPackV2; import org.neo4j.kernel.impl.logging.NullLogService; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; -import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.RETURNS_MOCKS; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.never; diff --git a/community/bolt/src/test/java/org/neo4j/bolt/v1/transport/integration/BoltChannelAutoReadLimiterIT.java b/community/bolt/src/test/java/org/neo4j/bolt/v1/transport/integration/BoltChannelAutoReadLimiterIT.java index def5a72847290..059be6e361022 100644 --- a/community/bolt/src/test/java/org/neo4j/bolt/v1/transport/integration/BoltChannelAutoReadLimiterIT.java +++ b/community/bolt/src/test/java/org/neo4j/bolt/v1/transport/integration/BoltChannelAutoReadLimiterIT.java @@ -29,8 +29,8 @@ import java.util.Map; import java.util.function.Consumer; -import org.neo4j.bolt.v1.messaging.Neo4jPackV1; import org.neo4j.bolt.runtime.BoltConnectionReadLimiter; +import org.neo4j.bolt.v1.messaging.Neo4jPackV1; import org.neo4j.bolt.v1.transport.socket.client.SocketConnection; import org.neo4j.bolt.v1.transport.socket.client.TransportConnection; import org.neo4j.collection.RawIterator; diff --git a/community/bolt/src/test/java/org/neo4j/bolt/v1/transport/integration/BoltThrottleMaxDurationIT.java b/community/bolt/src/test/java/org/neo4j/bolt/v1/transport/integration/BoltThrottleMaxDurationIT.java index 70e2df1cace6a..3deb023e3c1bf 100644 --- a/community/bolt/src/test/java/org/neo4j/bolt/v1/transport/integration/BoltThrottleMaxDurationIT.java +++ b/community/bolt/src/test/java/org/neo4j/bolt/v1/transport/integration/BoltThrottleMaxDurationIT.java @@ -37,8 +37,8 @@ import java.util.concurrent.TimeUnit; import java.util.function.Consumer; -import org.neo4j.bolt.v1.messaging.Neo4jPackV1; import org.neo4j.bolt.runtime.BoltConnection; +import org.neo4j.bolt.v1.messaging.Neo4jPackV1; import org.neo4j.bolt.v1.transport.socket.client.SecureSocketConnection; import org.neo4j.bolt.v1.transport.socket.client.SocketConnection; import org.neo4j.bolt.v1.transport.socket.client.TransportConnection; diff --git a/community/common/src/main/java/org/neo4j/kernel/api/exceptions/Status.java b/community/common/src/main/java/org/neo4j/kernel/api/exceptions/Status.java index ee1bf9ff3828b..2d9808936fe93 100644 --- a/community/common/src/main/java/org/neo4j/kernel/api/exceptions/Status.java +++ b/community/common/src/main/java/org/neo4j/kernel/api/exceptions/Status.java @@ -107,7 +107,7 @@ enum Request implements Status InvalidUsage( ClientError, // TODO: see above "The client made a request but did not consume outgoing buffers in a timely fashion." ), NoThreadsAvailable( TransientError, // TODO: see above - "There is no available thread to serve this request at the moment. You can retry at a later time " + + "There are no available threads to serve this request at the moment. You can retry at a later time " + "or consider increasing max pool / queue size for bolt connector(s)." ); private final Code code;