Github user animeshtrivedi commented on a diff in the pull request:

    https://github.com/apache/incubator-crail/pull/16#discussion_r180315522
  
    --- Diff: 
storage-nvmf/src/main/java/org/apache/crail/storage/nvmf/client/NvmfStagingBufferCache.java
 ---
    @@ -0,0 +1,160 @@
    +/*
    + * Copyright (C) 2018, IBM Corporation
    + *
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *    http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.crail.storage.nvmf.client;
    +
    +import org.apache.crail.CrailBuffer;
    +import org.apache.crail.CrailBufferCache;
    +import org.apache.crail.storage.StorageFuture;
    +
    +import java.util.Iterator;
    +import java.util.Map;
    +import java.util.Queue;
    +import java.util.concurrent.ArrayBlockingQueue;
    +import java.util.concurrent.ConcurrentHashMap;
    +import java.util.concurrent.atomic.AtomicInteger;
    +
    +public class NvmfStagingBufferCache {
    +   private final Map<Long, BufferCacheEntry> remoteAddressMap;
    +   private final Queue<CrailBuffer> freeBuffers;
    +   private int buffersLeft;
    +   private final int lbaDataSize;
    +   private final CrailBufferCache bufferCache;
    +
    +   private final CrailBufferCache getBufferCache() {
    +           return bufferCache;
    +   }
    +
    +   NvmfStagingBufferCache(CrailBufferCache bufferCache, int maxEntries, 
int lbaDataSize) {
    +           if (maxEntries <= 0) {
    --- End diff --
    
    Here as well, print the value that caused the error.


---

Reply via email to