pratham76 opened a new issue, #19234:
URL: https://github.com/apache/iceberg/issues/19234
When `lock()` fails, `MetastoreLock.createLock()` calls `findLock()`, which
iterates
`ShowLocksResponse.getLocks()` without a null check. `locks` is optional,
and some metastores
return a response without it set. The resulting NPE hides the original
`TException` from
`lock()`.
```
java.lang.NullPointerException: Cannot invoke "java.util.List.iterator()"
because the return value of
"org.apache.hadoop.hive.metastore.api.ShowLocksResponse.getLocks()" is null
at
org.apache.iceberg.hive.MetastoreLock.findLock(MetastoreLock.java:375)
at
org.apache.iceberg.hive.MetastoreLock.lambda$createLock$...(MetastoreLock.java:314)
...
at
org.apache.iceberg.hive.MetastoreLock.createLock(MetastoreLock.java:302)
at
org.apache.iceberg.hive.MetastoreLock.acquireLock(MetastoreLock.java:185)
at org.apache.iceberg.hive.MetastoreLock.lock(MetastoreLock.java:146)
at
org.apache.iceberg.hive.HiveTableOperations.doCommit(HiveTableOperations.java:272)
...
```
Affects 1.11.0, 1.12.0 and main.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]