Copilot commented on code in PR #424: URL: https://github.com/apache/atlas/pull/424#discussion_r2268423740
########## repository/src/main/java/org/apache/atlas/repository/graph/IndexRecoveryService.java: ########## @@ -287,7 +288,13 @@ private void stopIndexRecovery() { } private void printIndexRecoveryStats() { - this.graph.getManagementSystem().printIndexRecoveryStats(txRecoveryObject); + AtlasGraphManagement management = this.graph.getManagementSystem(); + + try { + management.printIndexRecoveryStats(txRecoveryObject); + } finally { + management.commit(); Review Comment: The printIndexRecoveryStats method call is wrapped in a try-finally block that only commits but doesn't handle rollback on exceptions. If printIndexRecoveryStats throws an exception, the transaction will still be committed, which may not be the intended behavior. ```suggestion management.commit(); } catch (Exception e) { management.rollback(); LOG.error("Error while printing index recovery stats", e); ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@atlas.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org