bharatviswa504 commented on pull request #2518:
URL: https://github.com/apache/ozone/pull/2518#issuecomment-895987765
@neils-dev
The explanation you have said is already handled, if cache is explicitly
having null, we considered it is deleted, as we delete from table by
doubleuffer thread in background.
```
public CacheResult<CACHEVALUE> lookup(CACHEKEY cachekey) {
CACHEVALUE cachevalue = cache.get(cachekey);
if (cachevalue == null) {
return new CacheResult<>(CacheResult.CacheStatus.MAY_EXIST,
null);
} else {
if (cachevalue.getCacheValue() != null) {
return new CacheResult<>(CacheResult.CacheStatus.EXISTS, cachevalue);
} else {
// When entity is marked for delete, cacheValue will be set to null.
return new CacheResult<>(CacheResult.CacheStatus.NOT_EXIST, null);
}
}
}
```
--
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]