NO-JIRA Fixing PagingStore not initialized exception during shutdown

This commit is contained in:
Clebert Suconic 2020-04-03 10:41:27 -04:00
parent 1320ad9367
commit 4e1840dce2
2 changed files with 6 additions and 2 deletions

View File

@ -791,7 +791,7 @@ public class PagingStoreImpl implements PagingStore {
final ReadLock managerLock) throws Exception {
if (!running) {
throw new IllegalStateException("PagingStore(" + getStoreName() + ") not initialized");
return false;
}
boolean full = isFull();

View File

@ -572,7 +572,11 @@ public class NullStorageManager implements StorageManager {
* <p>
* The reasoning is that exposing the lock is more explicit and therefore `less bad`.
*/
return store.page(msg, tx, listCtx, null);
if (store != null) {
return store.page(msg, tx, listCtx, null);
} else {
return false;
}
}
@Override