pradeepbn commented on a change in pull request #2868:
URL: https://github.com/apache/bookkeeper/pull/2868#discussion_r739451513
##########
File path:
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/storage/ldb/ReadCache.java
##########
@@ -126,9 +141,13 @@ public void put(long ledgerId, long entryId, ByteBuf
entry) {
}
}
- public ByteBuf get(long ledgerId, long entryId) {
+ public ByteBuf get(long ledgerId, long entryId) throws IOException {
lock.readLock().lock();
+ if (isStorageShutdown) {
+ LOG.error("Read cache has shutdown, not allowing read cache
operation");
+ throw new IOException();
Review comment:
Done
##########
File path:
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/storage/ldb/ReadCache.java
##########
@@ -107,7 +119,10 @@ public void put(long ledgerId, long entryId, ByteBuf
entry) {
// We could not insert in segment, we to get the write lock and
roll-over to
// next segment
lock.writeLock().lock();
-
+ if (isStorageShutdown) {
+ LOG.error("Read cache has shutdown, not allowing put cache
operation");
+ throw new IOException();
Review comment:
Done
--
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]