File tree Expand file tree Collapse file tree 2 files changed +8
-9
lines changed
legacy-cypher-projection/src/main/java/org/neo4j/gds/legacycypherprojection Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -162,8 +162,8 @@ public GraphDimensions estimationDimensions() {
162162 @ Override
163163 public CSRGraphStore build () {
164164 // Temporarily override the security context to enforce read-only access during load
165- return readOnlyTransaction (). apply (( tx , ktx ) -> {
166- try {
165+ try {
166+ return readOnlyTransaction (). apply (( tx , ktx ) -> {
167167 progressTracker .beginSubTask ("Loading" );
168168 BatchLoadResult nodeCount = new CountingCypherRecordLoader (
169169 cypherConfig .nodeQuery (),
@@ -198,11 +198,11 @@ public CSRGraphStore build() {
198198 logLoadingSummary (graphStore );
199199
200200 return graphStore ;
201- } catch ( RuntimeException ex ) {
202- progressTracker . endSubTaskWithFailure ();
203- throw ex ;
204- }
205- });
201+ });
202+ } catch ( Throwable ex ) {
203+ progressTracker . endSubTaskWithFailure () ;
204+ throw ex ;
205+ }
206206 }
207207
208208 private ProgressTracker initProgressTracker () {
Original file line number Diff line number Diff line change 2727import java .util .Collection ;
2828
2929import static org .neo4j .gds .utils .StringFormatting .formatWithLocale ;
30- import static org .neo4j .internal .kernel .api .security .AccessMode .Static .READ ;
3130
3231public class CypherQueryEstimator {
3332
@@ -48,7 +47,7 @@ public EstimationResult getRelationshipEstimation(String relationshipQuery) {
4847 }
4948
5049 private EstimationResult runEstimationQuery (String query , Collection <String > reservedColumns ) {
51- return context .withRestrictedAccess ( READ ). apply ((tx , ktx ) -> {
50+ return context .apply ((tx , ktx ) -> {
5251 var explainQuery = formatWithLocale ("EXPLAIN %s" , query );
5352 try (var result = tx .execute (explainQuery )) {
5453 var estimatedRows = (Number ) result .getExecutionPlanDescription ().getArguments ().get ("EstimatedRows" );
You can’t perform that action at this time.
0 commit comments