smengcl commented on code in PR #3588:
URL: https://github.com/apache/ozone/pull/3588#discussion_r919554586
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/multitenant/AuthorizerLockImpl.java:
##########
@@ -132,11 +132,12 @@ public long tryWriteLockThrowOnTimeout() throws
IOException {
@Override
public void tryWriteLockInOMRequest() throws IOException {
+ long stamp = tryWriteLockThrowOnTimeout();
+
// Sanity check. Must not have held a write lock in a tenant OMRequest.
Preconditions.checkArgument(omRequestWriteLockStamp == 0L);
Review Comment:
> In the case of a bug causing the Precondition to fail
I agree that if the `Precondition` in `tryWriteLockInOMRequest` failed, the
lock won't be released. Actually the OM will be in serious trouble if the
`Precondition` check doesn't pass (e.g. when some one / some other thread is
using the lock incorrectly).
Honestly I think we should just intentionally crash the OM at this point
because OM is likely running in an undefined / unrecoverable state at this
point, and the sooner it crashes the easier to debug the problem (and prevent
the unknown error from propagating).
--
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]