[PR] IGNITE-25076 Fix possible NullPointerException when FailureProcessor dumping a thread dump [ignite-3]

2025-04-10 Thread via GitHub


sk0x50 opened a new pull request, #5594:
URL: https://github.com/apache/ignite-3/pull/5594

   https://issues.apache.org/jira/browse/IGNITE-25076
   
   Thank you for submitting the pull request.
   
   To streamline the review process of the patch and ensure better code quality
   we ask both an author and a reviewer to verify the following:
   
   ### The Review Checklist
   - [ ] **Formal criteria:** TC status, codestyle, mandatory documentation. 
Also make sure to complete the following:  
   \- There is a single JIRA ticket related to the pull request.  
   \- The web-link to the pull request is attached to the JIRA ticket.  
   \- The JIRA ticket has the Patch Available state.  
   \- The description of the JIRA ticket explains WHAT was made, WHY and HOW.  
   \- The pull request title is treated as the final commit message. The 
following pattern must be used: IGNITE- Change summary where  - number 
of JIRA issue.
   - [ ] **Design:** new code conforms with the design principles of the 
components it is added to.
   - [ ] **Patch quality:** patch cannot be split into smaller pieces, its size 
must be reasonable.
   - [ ] **Code quality:** code is clean and readable, necessary developer 
documentation is added if needed.
   - [ ] **Tests code quality:** test set covers positive/negative scenarios, 
happy/edge cases. Tests are effective in terms of execution time and resources.
   
   ### Notes
   - [Apache Ignite Coding 
Guidelines](https://cwiki.apache.org/confluence/display/IGNITE/Java+Code+Style+Guide)


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] IGNITE-25076 Fix possible NullPointerException when FailureProcessor dumping a thread dump [ignite-3]

2025-04-09 Thread via GitHub


sk0x50 merged PR #5594:
URL: https://github.com/apache/ignite-3/pull/5594


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] IGNITE-25076 Fix possible NullPointerException when FailureProcessor dumping a thread dump [ignite-3]

2025-04-09 Thread via GitHub


sk0x50 commented on code in PR #5594:
URL: https://github.com/apache/ignite-3/pull/5594#discussion_r2035144720


##
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/exec/ExecutionServiceImpl.java:
##
@@ -764,7 +764,7 @@ String dumpDebugInfo() {
 
 private static String dumpThreads() {
 ThreadMXBean bean = ManagementFactory.getThreadMXBean();
-ThreadInfo[] infos = bean.dumpAllThreads(true, true);
+ThreadInfo[] infos = 
bean.dumpAllThreads(bean.isObjectMonitorUsageSupported(), 
bean.isSynchronizerUsageSupported());

Review Comment:
   Nice catch! Will fix it!



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] IGNITE-25076 Fix possible NullPointerException when FailureProcessor dumping a thread dump [ignite-3]

2025-04-09 Thread via GitHub


rpuch commented on code in PR #5594:
URL: https://github.com/apache/ignite-3/pull/5594#discussion_r2035141822


##
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/exec/ExecutionServiceImpl.java:
##
@@ -764,7 +764,7 @@ String dumpDebugInfo() {
 
 private static String dumpThreads() {
 ThreadMXBean bean = ManagementFactory.getThreadMXBean();
-ThreadInfo[] infos = bean.dumpAllThreads(true, true);
+ThreadInfo[] infos = 
bean.dumpAllThreads(bean.isObjectMonitorUsageSupported(), 
bean.isSynchronizerUsageSupported());

Review Comment:
   Let's add the same null check in the loop that follows



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]