justinmclean opened a new issue, #9139:
URL: https://github.com/apache/gravitino/issues/9139
### What would you like to be improved?
In TreeLock.java in unlock there is a NPE when you have a null timestamp
Here is a unit test to help:
```
@Test
void testUnlockWithMissingHoldingTimestamp() {
TreeLockNode rootNode = new TreeLockNode("root");
TreeLockNode childNode = rootNode.getOrCreateChild("child").getLeft();
TreeLock treeLock =
new TreeLock(Arrays.asList(rootNode, childNode),
NameIdentifier.of("root", "child"));
treeLock.lock(LockType.WRITE);
childNode.getHoldingThreadTimestamp().clear();
assertDoesNotThrow(treeLock::unlock);
}
```
### How should we improve?
deal with null timestamps
--
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]