mirror of https://github.com/apache/druid.git
Fix logs in SegmentLoaderLocalCacheManager (#7229)
This commit is contained in:
parent
0df8ee3f79
commit
e240fba247
|
@ -322,14 +322,16 @@ public class SegmentLoaderLocalCacheManager implements SegmentLoader
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("ObjectEquality")
|
||||||
private void unlock(DataSegment dataSegment, ReferenceCountingLock lock)
|
private void unlock(DataSegment dataSegment, ReferenceCountingLock lock)
|
||||||
{
|
{
|
||||||
segmentLocks.compute(
|
segmentLocks.compute(
|
||||||
dataSegment,
|
dataSegment,
|
||||||
(segment, existingLock) -> {
|
(segment, existingLock) -> {
|
||||||
//noinspection ObjectEquality
|
if (existingLock == null) {
|
||||||
if (existingLock == null || existingLock != lock) {
|
throw new ISE("WTH? the given lock has already been removed");
|
||||||
throw new ISE("WTH? Different createOrGetLock instance");
|
} else if (existingLock != lock) {
|
||||||
|
throw new ISE("WTH? Different lock instance");
|
||||||
} else {
|
} else {
|
||||||
if (existingLock.numReferences == 1) {
|
if (existingLock.numReferences == 1) {
|
||||||
return null;
|
return null;
|
||||||
|
|
Loading…
Reference in New Issue