private int lookupRecordId(@NotNull K key,
                             int adjustedKeyHash) throws IOException {
    return keyHashToChunkIdMap.lookup(adjustedKeyHash, recordId -> {
      long logChunkId = convertStoredIdToChunkId(recordId);
      ChunkedAppendOnlyLog.LogChunk chunk = keyValuesLog.read(logChunkId);
      ByteBuffer recordBuffer = chunk.read();
      int header = recordBuffer.getInt(0);
      if (isValueAbsent(header)) {
        return false;
      }

      int keyRecordSize = keySize(header);
      ByteBuffer keyRecordSlice = recordBuffer.slice(Integer.BYTES, keyRecordSize);
      K candidateKey = keyDescriptor.read(keyRecordSlice);
      if (keyDescriptor.isEqual(key, candidateKey)) {
        return true;
      }
      else {
        return false;
      }
    });
  }
private int lookupRecordId(@NotNull K key,
                             int adjustedKeyHash)