public void append(@NotNull K key,
                     @NotNull KnownSizeRecordWriter appender) throws IOException {
    int keyHash = keyEquality.getHashCode(key);
    int adjustedHash = HashUtils.adjustHash(keyHash);
    //Abstraction break: synchronize on keyHashToIdMap because we know keyHashToIdMap uses this-monitor to synchronize
    //    itself
    synchronized (keyHashToIdMap) {
      int foundRecordId = keyHashToIdMap.lookup(
        adjustedHash,
        candidateRecordId -> {
          int logRecordId = convertStoredIdToLogId(candidateRecordId);
          K candidateKey = readKey(logRecordId);
          if (candidateKey == null
              || !keyEquality.isEqual(key, candidateKey)) {
            return false; // [record.key != key] => hash collision => look further
          }

          return true;
        }
      );

      boolean keyRecordExisted = (foundRecordId != DurableIntToMultiIntMap.NO_VALUE);

      long potentiallyNewLogRecordId = appendToEntry(foundRecordId, key, appender);
      if (potentiallyNewLogRecordId == foundRecordId) {
        return;//new data appended to the already existing record => no need to update the map
      }

      int newStoredRecordId = convertLogIdToStoredId(potentiallyNewLogRecordId);

      if (keyRecordExisted) {
        // key record existed in the map => replace the old id with the new one:
        keyHashToIdMap.replace(adjustedHash, foundRecordId, newStoredRecordId);
      }
      else {
        // key record not existed in the map => add
        keyHashToIdMap.put(adjustedHash, newStoredRecordId);
      }
    }
  }
public void append(@NotNull K key,
                     @NotNull KnownSizeRecordWriter appender)