private void appendImpl(@NotNull VItem item,
                            int valueSize,
                            @NotNull DataExternalizerEx.KnownSizeRecordWriter writer) throws IOException {
      maybeAdvanceLastChunk();
      int totalRecordSize = valueSize + Integer.BYTES;
      boolean appended = lastChunk.append(buffer -> {
        //TODO RC: do we need a valueSize, or value writer/readers should do it themselves?
        //         this is really a question of KeyDescriptorEx/KnownSizeRecordWriter contract:
        //         should they ensure record size stored? Or should they rely on calling code (i.e. storage)
        //         provide the buffer (slice) of exact size -- hence, it is storage's responsibility to
        //         keep record size somehow?
        buffer.putInt(valueSize);
        return writer.write(buffer);
      }, totalRecordSize);

      if (!appended) {//not enough capacity left in chunk => allocate & chain new chunk
        ChunkedAppendOnlyLog.LogChunk nextChunk = keyValuesLog.append(lastChunk.capacity(), /*reserveNextChunkIdField: */ true);
        boolean succeed = lastChunk.nextChunkId(nextChunk.id());
        if (!succeed) {//FIXME: implement something like retry
          throw new IllegalStateException("FIXME: ...");
        }

        lastChunk = nextChunk;
        append(item);
      }
    }
private void appendImpl(@NotNull VItem item,
                            int valueSize,
                            @NotNull DataExternalizerEx.KnownSizeRecordWriter writer)