Skip to content

Commit 800d376

Browse files
author
Zhen Li
committed
Fix a few names after review
1 parent aa332d4 commit 800d376

29 files changed

+58
-58
lines changed

driver/src/main/java/org/neo4j/driver/exceptions/RoutingException.java renamed to driver/src/main/java/org/neo4j/driver/exceptions/FatalDiscoveryException.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,18 @@
1919
package org.neo4j.driver.exceptions;
2020

2121
/**
22-
* A routing error indicate a fatal problem to obtain routing tables such as the routing table for a specified database does not exist.
22+
* This error indicate a fatal problem to obtain routing tables such as the routing table for a specified database does not exist.
2323
* This exception should not be retried.
2424
* @since 2.0
2525
*/
26-
public class RoutingException extends ClientException
26+
public class FatalDiscoveryException extends ClientException
2727
{
28-
public RoutingException( String message )
28+
public FatalDiscoveryException( String message )
2929
{
3030
super( message );
3131
}
3232

33-
public RoutingException( String code, String message )
33+
public FatalDiscoveryException( String code, String message )
3434
{
3535
super( code, message );
3636
}

driver/src/main/java/org/neo4j/driver/internal/cluster/ClusterRoutingTable.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public class ClusterRoutingTable implements RoutingTable
4040
private final AddressSet writers;
4141
private final AddressSet routers;
4242

43-
private final String databaseName; // specifies this routing table is the routing table of database named this.
43+
private final String databaseName; // specifies the database this routing table is acquired for
4444
private boolean preferInitialRouter;
4545

4646
public ClusterRoutingTable( String ofDatabase, Clock clock, BoltServerAddress... routingAddresses )
@@ -133,7 +133,7 @@ public String database()
133133
}
134134

135135
@Override
136-
public void removeWriter( BoltServerAddress toRemove )
136+
public void forgetWriter( BoltServerAddress toRemove )
137137
{
138138
writers.remove( toRemove );
139139
}

driver/src/main/java/org/neo4j/driver/internal/cluster/RediscoveryImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
import java.util.stream.Stream;
3232

3333
import org.neo4j.driver.Logger;
34-
import org.neo4j.driver.exceptions.RoutingException;
34+
import org.neo4j.driver.exceptions.FatalDiscoveryException;
3535
import org.neo4j.driver.exceptions.SecurityException;
3636
import org.neo4j.driver.exceptions.ServiceUnavailableException;
3737
import org.neo4j.driver.internal.BoltServerAddress;
@@ -242,7 +242,7 @@ private CompletionStage<ClusterComposition> lookupOnRouter( BoltServerAddress ro
242242
private ClusterComposition handleRoutingProcedureError( Throwable error, RoutingTable routingTable,
243243
BoltServerAddress routerAddress )
244244
{
245-
if ( error instanceof SecurityException || error instanceof RoutingException )
245+
if ( error instanceof SecurityException || error instanceof FatalDiscoveryException )
246246
{
247247
// auth error or routing error happened, terminate the discovery procedure immediately
248248
throw new CompletionException( error );

driver/src/main/java/org/neo4j/driver/internal/cluster/RoutingProcedureRunner.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
import org.neo4j.driver.TransactionConfig;
3030
import org.neo4j.driver.async.StatementResultCursor;
3131
import org.neo4j.driver.exceptions.ClientException;
32-
import org.neo4j.driver.exceptions.RoutingException;
32+
import org.neo4j.driver.exceptions.FatalDiscoveryException;
3333
import org.neo4j.driver.internal.BookmarksHolder;
3434
import org.neo4j.driver.internal.async.connection.DirectConnection;
3535
import org.neo4j.driver.internal.spi.Connection;
@@ -44,9 +44,9 @@
4444
public class RoutingProcedureRunner
4545
{
4646
static final String ROUTING_CONTEXT = "context";
47-
static final String GET_ROUTING_TABLE = "dbms.cluster.routing.getRoutingTable({" + ROUTING_CONTEXT + "})";
47+
static final String GET_ROUTING_TABLE = "dbms.cluster.routing.getRoutingTable($" + ROUTING_CONTEXT + ")";
4848
static final String DATABASE_NAME = "database";
49-
static final String MULTI_DB_GET_ROUTING_TABLE = String.format( "dbms.routing.getRoutingTable({%s}, {%s})", ROUTING_CONTEXT, DATABASE_NAME );
49+
static final String MULTI_DB_GET_ROUTING_TABLE = String.format( "dbms.routing.getRoutingTable($%s, $%s)", ROUTING_CONTEXT, DATABASE_NAME );
5050

5151
private final RoutingContext context;
5252

@@ -108,7 +108,7 @@ private Statement procedureStatement( ServerVersion serverVersion, String databa
108108
{
109109
if ( databaseName != null )
110110
{
111-
throw new RoutingException( String.format( "Refreshing routing table for multi-databases is not supported in server version lower than 4.0. " +
111+
throw new FatalDiscoveryException( String.format( "Refreshing routing table for multi-databases is not supported in server version lower than 4.0. " +
112112
"Current server version: %s. Database name: `%s`", serverVersion, databaseName ) );
113113
}
114114
return new Statement( "CALL " + GET_ROUTING_TABLE,

driver/src/main/java/org/neo4j/driver/internal/cluster/RoutingTable.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public interface RoutingTable
4343

4444
String database();
4545

46-
void removeWriter( BoltServerAddress toRemove );
46+
void forgetWriter( BoltServerAddress toRemove );
4747

4848
boolean preferInitialRouter();
4949
}

driver/src/main/java/org/neo4j/driver/internal/cluster/RoutingTableHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public void onConnectionFailure( BoltServerAddress address )
6666
@Override
6767
public void onWriteFailure( BoltServerAddress address )
6868
{
69-
routingTable.removeWriter( address );
69+
routingTable.forgetWriter( address );
7070
}
7171

7272
synchronized CompletionStage<RoutingTable> refreshRoutingTable( AccessMode mode )

driver/src/main/java/org/neo4j/driver/internal/cluster/RoutingTableRegistryImpl.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
public class RoutingTableRegistryImpl implements RoutingTableRegistry
3434
{
35-
private final ConcurrentMap<String,RoutingTableHandler> routingTables;
35+
private final ConcurrentMap<String,RoutingTableHandler> routingTableHandlers;
3636
private final RoutingTableHandlerFactory factory;
3737
private final Logger logger;
3838

@@ -41,10 +41,10 @@ public RoutingTableRegistryImpl( ConnectionPool connectionPool, Rediscovery redi
4141
this( new ConcurrentHashMap<>(), new RoutingTableHandlerFactory( connectionPool, rediscovery, clock, logger ), logger );
4242
}
4343

44-
RoutingTableRegistryImpl( ConcurrentMap<String,RoutingTableHandler> routingTables, RoutingTableHandlerFactory factory, Logger logger )
44+
RoutingTableRegistryImpl( ConcurrentMap<String,RoutingTableHandler> routingTableHandlers, RoutingTableHandlerFactory factory, Logger logger )
4545
{
4646
this.factory = factory;
47-
this.routingTables = routingTables;
47+
this.routingTableHandlers = routingTableHandlers;
4848
this.logger = logger;
4949
}
5050

@@ -61,7 +61,7 @@ public Set<BoltServerAddress> allServers()
6161
// obviously we just had a snapshot of all servers in all routing tables
6262
// after we read it, the set could already be changed.
6363
Set<BoltServerAddress> servers = new HashSet<>();
64-
for ( RoutingTableHandler tableHandler : routingTables.values() )
64+
for ( RoutingTableHandler tableHandler : routingTableHandlers.values() )
6565
{
6666
servers.addAll( tableHandler.servers() );
6767
}
@@ -71,32 +71,32 @@ public Set<BoltServerAddress> allServers()
7171
@Override
7272
public void remove( String databaseName )
7373
{
74-
routingTables.remove( databaseName );
74+
routingTableHandlers.remove( databaseName );
7575
logger.debug( "Routing table handler for database '%s' is removed.", databaseName );
7676
}
7777

7878
@Override
7979
public void purgeAged()
8080
{
81-
routingTables.forEach( ( databaseName, handler ) -> {
81+
routingTableHandlers.forEach( ( databaseName, handler ) -> {
8282
if ( handler.isRoutingTableAged() )
8383
{
8484
logger.info( "Routing table handler for database '%s' is removed because it has not been used for a long time. Routing table: %s",
8585
databaseName, handler.routingTable() );
86-
routingTables.remove( databaseName );
86+
routingTableHandlers.remove( databaseName );
8787
}
8888
} );
8989
}
9090

9191
// For tests
92-
public boolean contains( String database )
92+
public boolean contains( String databaseName )
9393
{
94-
return routingTables.containsKey( database );
94+
return routingTableHandlers.containsKey( databaseName );
9595
}
9696

9797
private RoutingTableHandler getOrCreate( String databaseName )
9898
{
99-
return routingTables.computeIfAbsent( databaseName, name -> {
99+
return routingTableHandlers.computeIfAbsent( databaseName, name -> {
100100
RoutingTableHandler handler = factory.newInstance( name, this );
101101
logger.debug( "Routing table handler for database '%s' is added.", databaseName );
102102
return handler;

driver/src/main/java/org/neo4j/driver/internal/util/ErrorUtil.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import org.neo4j.driver.exceptions.ClientException;
2828
import org.neo4j.driver.exceptions.DatabaseException;
2929
import org.neo4j.driver.exceptions.Neo4jException;
30-
import org.neo4j.driver.exceptions.RoutingException;
30+
import org.neo4j.driver.exceptions.FatalDiscoveryException;
3131
import org.neo4j.driver.exceptions.ServiceUnavailableException;
3232
import org.neo4j.driver.exceptions.TransientException;
3333

@@ -65,7 +65,7 @@ public static Neo4jException newNeo4jError( String code, String message )
6565
}
6666
else if ( code.equalsIgnoreCase( "Neo.ClientError.Database.DatabaseNotFound" ) )
6767
{
68-
return new RoutingException( code, message );
68+
return new FatalDiscoveryException( code, message );
6969
}
7070
else
7171
{

driver/src/test/java/org/neo4j/driver/integration/RoutingDriverMultidatabaseBoltKitTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
import org.neo4j.driver.Driver;
3232
import org.neo4j.driver.GraphDatabase;
3333
import org.neo4j.driver.Session;
34-
import org.neo4j.driver.exceptions.RoutingException;
34+
import org.neo4j.driver.exceptions.FatalDiscoveryException;
3535
import org.neo4j.driver.exceptions.ServiceUnavailableException;
3636
import org.neo4j.driver.integration.RoutingDriverBoltKitTest.PortBasedServerAddressComparator;
3737
import org.neo4j.driver.net.ServerAddress;
@@ -106,7 +106,7 @@ void shouldThrowRoutingErrorIfDatabaseNotFound() throws IOException, Interrupted
106106
try ( Driver driver = GraphDatabase.driver( uri, INSECURE_CONFIG );
107107
Session session = driver.session( t -> t.withDefaultAccessMode( AccessMode.READ ).withDatabase( "myDatabase" ) ) )
108108
{
109-
final RoutingException error = assertThrows( RoutingException.class, () -> {
109+
final FatalDiscoveryException error = assertThrows( FatalDiscoveryException.class, () -> {
110110
session.run( "MATCH (n) RETURN n.name" );
111111
} );
112112

driver/src/test/java/org/neo4j/driver/internal/cluster/loadbalancing/RoutingTableAndConnectionPoolTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
import org.neo4j.driver.AccessMode;
4747
import org.neo4j.driver.Logging;
4848
import org.neo4j.driver.exceptions.ProtocolException;
49-
import org.neo4j.driver.exceptions.RoutingException;
49+
import org.neo4j.driver.exceptions.FatalDiscoveryException;
5050
import org.neo4j.driver.internal.BoltServerAddress;
5151
import org.neo4j.driver.internal.async.connection.BootstrapFactory;
5252
import org.neo4j.driver.internal.async.connection.ChannelConnector;
@@ -129,12 +129,12 @@ void shouldNotAddToRoutingTableWhenFailedWithRoutingError() throws Throwable
129129
// Given
130130
ConnectionPool connectionPool = newConnectionPool();
131131
Rediscovery rediscovery = mock( Rediscovery.class );
132-
when( rediscovery.lookupClusterComposition( any(), any() ) ).thenReturn( Futures.failedFuture( new RoutingException( "No database found" ) ) );
132+
when( rediscovery.lookupClusterComposition( any(), any() ) ).thenReturn( Futures.failedFuture( new FatalDiscoveryException( "No database found" ) ) );
133133
RoutingTableRegistryImpl routingTables = newRoutingTables( connectionPool, rediscovery );
134134
LoadBalancer loadBalancer = newLoadBalancer( connectionPool, routingTables );
135135

136136
// When
137-
assertThrows( RoutingException.class, () -> await( loadBalancer.acquireConnection( "neo4j", AccessMode.WRITE ) ) );
137+
assertThrows( FatalDiscoveryException.class, () -> await( loadBalancer.acquireConnection( "neo4j", AccessMode.WRITE ) ) );
138138

139139
// Then
140140
assertTrue( routingTables.allServers().isEmpty() );

driver/src/test/resources/acquire_endpoints_v3.script

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
!: AUTO HELLO
44
!: AUTO GOODBYE
55

6-
C: RUN "CALL dbms.cluster.routing.getRoutingTable({context})" {"context": {}} {}
6+
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}} {}
77
PULL_ALL
88
S: SUCCESS {"fields": ["ttl", "servers"]}
99
RECORD [9223372036854775807, [{"addresses": ["127.0.0.1:9007","127.0.0.1:9008"],"role": "WRITE"}, {"addresses": ["127.0.0.1:9005","127.0.0.1:9006"], "role": "READ"},{"addresses": ["127.0.0.1:9001","127.0.0.1:9002","127.0.0.1:9003"], "role": "ROUTE"}]]

driver/src/test/resources/acquire_endpoints_v3_empty.script

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
!: AUTO HELLO
44
!: AUTO GOODBYE
55

6-
C: RUN "CALL dbms.cluster.routing.getRoutingTable({context})" {"context": {}} {}
6+
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}} {}
77
PULL_ALL
88
S: SUCCESS {"fields": ["ttl", "servers"]}
99
RECORD [9223372036854775807, []]

driver/src/test/resources/acquire_endpoints_v3_leader_killed.script

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,22 @@
33
!: AUTO HELLO
44
!: AUTO GOODBYE
55

6-
C: RUN "CALL dbms.cluster.routing.getRoutingTable({context})" {"context": {}} {}
6+
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}} {}
77
PULL_ALL
88
S: SUCCESS {"fields": ["ttl", "servers"]}
99
RECORD [9223372036854775807, [{"addresses": ["127.0.0.1:9004"],"role": "WRITE"}, {"addresses": ["127.0.0.1:9005","127.0.0.1:9006"], "role": "READ"},{"addresses": ["127.0.0.1:9001"], "role": "ROUTE"}]]
1010
SUCCESS {}
11-
C: RUN "CALL dbms.cluster.routing.getRoutingTable({context})" {"context": {}} {}
11+
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}} {}
1212
PULL_ALL
1313
S: SUCCESS {"fields": ["ttl", "servers"]}
1414
RECORD [9223372036854775807, [{"addresses": ["127.0.0.1:9004"],"role": "WRITE"}, {"addresses": ["127.0.0.1:9005","127.0.0.1:9006"], "role": "READ"},{"addresses": ["127.0.0.1:9001"], "role": "ROUTE"}]]
1515
SUCCESS {}
16-
C: RUN "CALL dbms.cluster.routing.getRoutingTable({context})" {"context": {}} {}
16+
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}} {}
1717
PULL_ALL
1818
S: SUCCESS {"fields": ["ttl", "servers"]}
1919
RECORD [9223372036854775807, [{"addresses": [],"role": "WRITE"}, {"addresses": ["127.0.0.1:9005","127.0.0.1:9006"], "role": "READ"},{"addresses": ["127.0.0.1:9001"], "role": "ROUTE"}]]
2020
SUCCESS {}
21-
C: RUN "CALL dbms.cluster.routing.getRoutingTable({context})" {"context": {}} {}
21+
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}} {}
2222
PULL_ALL
2323
S: SUCCESS {"fields": ["ttl", "servers"]}
2424
RECORD [9223372036854775807, [{"addresses": ["127.0.0.1:9008"],"role": "WRITE"}, {"addresses": ["127.0.0.1:9005","127.0.0.1:9006"], "role": "READ"},{"addresses": ["127.0.0.1:9001"], "role": "ROUTE"}]]

driver/src/test/resources/acquire_endpoints_v3_point_to_empty_router_and_exit.script

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
!: AUTO HELLO
44
!: AUTO GOODBYE
55

6-
C: RUN "CALL dbms.cluster.routing.getRoutingTable({context})" {"context": {}} {}
6+
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}} {}
77
PULL_ALL
88
S: SUCCESS {"fields": ["ttl", "servers"]}
99
RECORD [9223372036854775807, [{"addresses": ["127.0.0.1:9010"],"role": "WRITE"}, {"addresses": ["127.0.0.1:9011"], "role": "READ"},{"addresses": ["127.0.0.1:9004"], "role": "ROUTE"}]]

driver/src/test/resources/acquire_endpoints_v3_three_servers_and_exit.script

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
!: AUTO HELLO
44
!: AUTO GOODBYE
55

6-
C: RUN "CALL dbms.cluster.routing.getRoutingTable({context})" {"context": {}} {}
6+
C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": {}} {}
77
PULL_ALL
88
S: SUCCESS {"fields": ["ttl", "servers"]}
99
RECORD [9223372036854775807, [{"addresses": ["127.0.0.1:9001"],"role": "WRITE"}, {"addresses": ["127.0.0.1:9002","127.0.0.1:9003"], "role": "READ"},{"addresses": ["127.0.0.1:9001","127.0.0.1:9002","127.0.0.1:9003"], "role": "ROUTE"}]]

driver/src/test/resources/acquire_endpoints_v4.script

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
!: AUTO HELLO
44
!: AUTO GOODBYE
55

6-
C: RUN "CALL dbms.routing.getRoutingTable({context}, {database})" {"context": {}, "database": null} {"mode": "r", "db": "system"}
6+
C: RUN "CALL dbms.routing.getRoutingTable($context, $database)" {"context": {}, "database": null} {"mode": "r", "db": "system"}
77
PULL {"n": -1}
88
S: SUCCESS {"fields": ["ttl", "servers"]}
99
RECORD [9223372036854775807, [{"addresses": ["127.0.0.1:9007","127.0.0.1:9008"],"role": "WRITE"}, {"addresses": ["127.0.0.1:9005","127.0.0.1:9006"], "role": "READ"},{"addresses": ["127.0.0.1:9001","127.0.0.1:9002","127.0.0.1:9003"], "role": "ROUTE"}]]
1010
SUCCESS {}
11-
C: RUN "CALL dbms.routing.getRoutingTable({context}, {database})" {"context": {}, "database": "myDatabase"} {"mode": "r", "db": "system"}
11+
C: RUN "CALL dbms.routing.getRoutingTable($context, $database)" {"context": {}, "database": "myDatabase"} {"mode": "r", "db": "system"}
1212
PULL {"n": -1}
1313
S: SUCCESS {"fields": ["ttl", "servers"]}
1414
RECORD [9223372036854775807, [{"addresses": ["127.0.0.1:9007","127.0.0.1:9008"],"role": "WRITE"}, {"addresses": ["127.0.0.1:9005","127.0.0.1:9006"], "role": "READ"},{"addresses": ["127.0.0.1:9001","127.0.0.1:9002","127.0.0.1:9003"], "role": "ROUTE"}]]

driver/src/test/resources/acquire_endpoints_v4_database_not_found.script

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
!: AUTO HELLO
44
!: AUTO GOODBYE
55

6-
C: RUN "CALL dbms.routing.getRoutingTable({context}, {database})" {"context": {}, "database": null} {"mode": "r", "db": "system"}
6+
C: RUN "CALL dbms.routing.getRoutingTable($context, $database)" {"context": {}, "database": null} {"mode": "r", "db": "system"}
77
PULL {"n": -1}
88
S: SUCCESS {"fields": ["ttl", "servers"]}
99
RECORD [9223372036854775807, [{"addresses": ["127.0.0.1:9007","127.0.0.1:9008"],"role": "WRITE"}, {"addresses": ["127.0.0.1:9005","127.0.0.1:9006"], "role": "READ"},{"addresses": ["127.0.0.1:9001","127.0.0.1:9002","127.0.0.1:9003"], "role": "ROUTE"}]]
1010
SUCCESS {}
11-
C: RUN "CALL dbms.routing.getRoutingTable({context}, {database})" {"context": {}, "database": "myDatabase"} {"mode": "r", "db": "system"}
11+
C: RUN "CALL dbms.routing.getRoutingTable($context, $database)" {"context": {}, "database": "myDatabase"} {"mode": "r", "db": "system"}
1212
PULL {"n": -1}
1313
S: FAILURE {"code": "Neo.ClientError.Database.DatabaseNotFound", "message": "wut!"}
1414
IGNORED

driver/src/test/resources/acquire_endpoints_v4_empty.script

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
!: AUTO HELLO
44
!: AUTO GOODBYE
55

6-
C: RUN "CALL dbms.routing.getRoutingTable({context}, {database})" {"context": {}, "database": null} {"mode": "r", "db": "system"}
6+
C: RUN "CALL dbms.routing.getRoutingTable($context, $database)" {"context": {}, "database": null} {"mode": "r", "db": "system"}
77
PULL {"n": -1}
88
S: SUCCESS {"fields": ["ttl", "servers"]}
99
RECORD [9223372036854775807, [{"addresses": ["127.0.0.1:9007","127.0.0.1:9008"],"role": "WRITE"}, {"addresses": ["127.0.0.1:9005","127.0.0.1:9006"], "role": "READ"},{"addresses": ["127.0.0.1:9001","127.0.0.1:9002","127.0.0.1:9003"], "role": "ROUTE"}]]
1010
SUCCESS {}
11-
C: RUN "CALL dbms.routing.getRoutingTable({context}, {database})" {"context": {}, "database": "myDatabase"} {"mode": "r", "db": "system"}
11+
C: RUN "CALL dbms.routing.getRoutingTable($context, $database)" {"context": {}, "database": "myDatabase"} {"mode": "r", "db": "system"}
1212
PULL {"n": -1}
1313
S: SUCCESS {"fields": ["ttl", "servers"]}
1414
RECORD [9223372036854775807, []]

driver/src/test/resources/acquire_endpoints_v4_multi_db.script

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
!: AUTO HELLO
44
!: AUTO GOODBYE
55

6-
C: RUN "CALL dbms.routing.getRoutingTable({context}, {database})" {"context": {}, "database": null} {"mode": "r", "db": "system"}
6+
C: RUN "CALL dbms.routing.getRoutingTable($context, $database)" {"context": {}, "database": null} {"mode": "r", "db": "system"}
77
PULL {"n": -1}
88
S: SUCCESS {"fields": ["ttl", "servers"]}
99
RECORD [9223372036854775807, [{"addresses": ["127.0.0.1:9007","127.0.0.1:9008"],"role": "WRITE"}, {"addresses": ["127.0.0.1:9005","127.0.0.1:9006"], "role": "READ"},{"addresses": ["127.0.0.1:9001","127.0.0.1:9002","127.0.0.1:9003"], "role": "ROUTE"}]]
1010
SUCCESS {}
11-
C: RUN "CALL dbms.routing.getRoutingTable({context}, {database})" {"context": {}, "database": "Unreachable"} {"mode": "r", "db": "system"}
11+
C: RUN "CALL dbms.routing.getRoutingTable($context, $database)" {"context": {}, "database": "Unreachable"} {"mode": "r", "db": "system"}
1212
PULL {"n": -1}
1313
S: SUCCESS {"fields": ["ttl", "servers"]}
1414
RECORD [9223372036854775807, []]
1515
SUCCESS {}
16-
C: RUN "CALL dbms.routing.getRoutingTable({context}, {database})" {"context": {}, "database": "myDatabase"} {"mode": "r", "db": "system"}
16+
C: RUN "CALL dbms.routing.getRoutingTable($context, $database)" {"context": {}, "database": "myDatabase"} {"mode": "r", "db": "system"}
1717
PULL {"n": -1}
1818
S: SUCCESS {"fields": ["ttl", "servers"]}
1919
RECORD [9223372036854775807, [{"addresses": ["127.0.0.1:9007","127.0.0.1:9008"],"role": "WRITE"}, {"addresses": ["127.0.0.1:9005","127.0.0.1:9006"], "role": "READ"},{"addresses": ["127.0.0.1:9001","127.0.0.1:9002","127.0.0.1:9003"], "role": "ROUTE"}]]

0 commit comments

Comments
 (0)