Skip to content

Commit 2593b74

Browse files
committed
chore: improve error log message when reset fails
1 parent 7261d71 commit 2593b74

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

  • v2/googlecloud-to-neo4j/src/main/java/com/google/cloud/teleport/v2/neo4j/database

v2/googlecloud-to-neo4j/src/main/java/com/google/cloud/teleport/v2/neo4j/database/Neo4jConnection.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,13 @@ public void resetDatabase() {
120120
}
121121
} catch (Exception exception) {
122122
LOG.error(
123-
"Error resetting database: "
124-
+ "make sure the configured Neo4j user is allowed to run 'CREATE OR REPLACE DATABASE', "
125-
+ "'SHOW CONSTRAINTS', 'DROP CONSTRAINT', 'SHOW INDEXES' and 'DROP INDEXES'.\n"
126-
+ "Alternatively, disable database reset by setting 'reset_db' to false in the job specification.",
123+
"""
124+
Failed to reset Neo4j database. The reset uses CREATE OR REPLACE DATABASE when
125+
supported; otherwise, or if that fails, it deletes all nodes and relationships and
126+
drops constraints/indexes. Check that the configured Neo4j user can run either CREATE
127+
OR REPLACE DATABASE or the fallback operations: MATCH/DETACH DELETE, SHOW/DROP
128+
CONSTRAINTS, and SHOW/DROP INDEXES. To skip reset, set 'reset_db' to false in the job
129+
specification.""",
127130
exception);
128131
}
129132
}

0 commit comments

Comments
 (0)