keith-turner commented on code in PR #4298:
URL: https://github.com/apache/accumulo/pull/4298#discussion_r1503068159
##########
server/manager/src/main/java/org/apache/accumulo/manager/tableOps/Utils.java:
##########
@@ -171,17 +168,22 @@ private static Lock getLock(ServerContext context,
AbstractId<?> id, FateId fate
// Validate the recovered lock type
boolean isWriteLock = lock.getType() == LockType.WRITE;
- if (writeLock != isWriteLock) {
- throw new IllegalStateException("Unexpected lock type " +
lock.getType()
- + " recovered for transaction " + fateId + " on object " + id + ".
Expected "
- + (writeLock ? LockType.WRITE : LockType.READ) + " lock instead.");
+ if (!lock.getType().equals(lockType)) {
Review Comment:
```suggestion
if (lock.getType() != lockType) {
```
--
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]