How to renew the route table after i create new database for golang sdk environment

Version

Sight

i need a new neo4j database to insert the csv data to neo4j using the apoc extend package

The pseudocode is as follows

 driverWithContext.Run(ctx,"create database graphName  ")
 
 new driverWithContext

 dirverWithContext.NewSession(Options{Database:graphName}).Run(cypher language)

Result

Neo4jError: Neo.TransientError.General.DatabaseUnavailable(Unable to get a routing table for database 'graphName' because this database is unavailable)

Database creation is not synchronous.

If you need to connect to the database right after issuing its creation, you should look into the various WAIT options: https://neo4j.com/docs/operations-manual/current/database-administration/standard-databases/wait-options/.

Something like CREATE DATABASE $db WAIT 10 seconds.