You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gravitino.apache.org by "justinmclean (via GitHub)" <gi...@apache.org> on 2025/08/20 05:30:45 UTC

[I] [Improvement] Fix possible NPEs in GravitinoConnector.java [gravitino]

justinmclean opened a new issue, #8198:
URL: https://github.com/apache/gravitino/issues/8198

   ### What would you like to be improved?
   
   In trino-connector/trino-connector/src/main/java/org/apache/gravitino/trino/connector/GravitinoConnector.java, add checkArguments in beginTransaction to ensure both the internal connector and the transaction handle are validated before use.
   
   ### How should we improve?
   
   See Above, also add a unit test to cover this.


-- 
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: commits-unsubscribe@gravitino.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Improvement] Fix possible NPEs in GravitinoConnector.java [gravitino]

Posted by "pandeysambhi (via GitHub)" <gi...@apache.org>.
pandeysambhi commented on issue #8198:
URL: https://github.com/apache/gravitino/issues/8198#issuecomment-3210976578

   @justinmclean I see a null check for the internal connector already in place. 
   [ trino-connector/trino-connector/src/test/java/org/apache/gravitino/trino/connector/TestGravitinoConnectorNullChecks.java](https://github.com/apache/gravitino/blob/main/trino-connector/trino-connector/src/main/java/org/apache/gravitino/trino/connector/GravitinoConnector.java#L71). Do you want this to be moved up before internalTransactionHandler is initialised, and add a null check for internalTransactionHandler before it's returned? 
   


-- 
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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Improvement] Fix possible NPEs in GravitinoConnector.java [gravitino]

Posted by "pandeysambhi (via GitHub)" <gi...@apache.org>.
pandeysambhi commented on issue #8198:
URL: https://github.com/apache/gravitino/issues/8198#issuecomment-3209022992

   @justinmclean can I take this up?


-- 
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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Improvement] Fix possible NPEs in GravitinoConnector.java [gravitino]

Posted by "justinmclean (via GitHub)" <gi...@apache.org>.
justinmclean commented on issue #8198:
URL: https://github.com/apache/gravitino/issues/8198#issuecomment-3212768371

   I think it's better to fail fast, so yes move the internalConnector check before calling beginTransaction and add a null check on the returned internalTransactionHandle. It’s cheap and gives a clear failure.
   


-- 
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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Improvement] Fix possible NPEs in GravitinoConnector.java [gravitino]

Posted by "diqiu50 (via GitHub)" <gi...@apache.org>.
diqiu50 closed issue #8198: [Improvement] Fix possible NPEs in GravitinoConnector.java
URL: https://github.com/apache/gravitino/issues/8198


-- 
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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org