constellation-app / constellation

A graph-focused data visualisation and interactive analysis application.
https://constellation-app.com
Apache License 2.0
385 stars 59 forks source link

Katz Centrality Analytics: Fix to prevent JVM from crashing. #2197

Closed OrionsGuardian closed 2 weeks ago

OrionsGuardian commented 2 weeks ago

Prerequisites

Description of the Change

Arrays have been replaced with ArrayLists in the processing of the Katz Centrality Analytic data. This code change prevents a JVM crash that occurs when using the Katz Centrality Analytic on a mid-large graph. The underlying issue is within Java itself with its management of Arrays. A newer version of Java (22) seems to have addressed the issue, but we cannot move to that version yet due to other compatibility issues.

Alternate Designs

Considered updating Java to a newer version, but no other versions at the same release level were suitable.

Why Should This Be In Core?

To avoid an abrupt crash of the application.

Benefits

Katz Centrality Analytic will perform as expected, without any surprise abrupt crashes.

Possible Drawbacks

Potentially less performant than using Arrays directly.

Verification Process

Open a large graph and preform some Analytic operations: Select Categories - Centrality, Test/Select various combinations of Centrality Analytics to run, some using Katz, some without. Confirm the application remains active and running normally (no crashing).

Applicable Issues

2191

sonarcloud[bot] commented 2 weeks ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
95.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud