@Override
  public <E extends Throwable> int updateRecord(final int recordId,
                                                final @NotNull RecordUpdater<E> updater) throws E, IOException {
    final int trueRecordId = (recordId <= NULL_ID) ?
                             allocateRecord() :
                             recordId;
    final long recordOffsetInFile = recordOffsetInFile(recordId);
    final int recordOffsetOnPage = storage.toOffsetInPage(recordOffsetInFile);
    try (final PageUnsafe page = (PageUnsafe)storage.pageByOffset(recordOffsetInFile, /*forWrite: */true)) {
      page.lockPageForWrite();
      try {
        //RC: hope EscapeAnalysis removes the allocation here:
        final RecordAccessor recordAccessor = new RecordAccessor(recordId, recordOffsetOnPage, page, allocatedRecordsCount);
        final boolean updated = updater.updateRecord(recordAccessor);
        if (updated) {
          incrementRecordVersion(recordAccessor.pageBuffer, recordOffsetOnPage);
          page.regionModified(recordOffsetOnPage, RECORD_SIZE_IN_BYTES);
        }
        return trueRecordId;
      }
      finally {
        page.unlockPageForWrite();
      }
    }
  }
@Override
  public <E extends Throwable> int updateRecord(final int recordId,
                                                final @NotNull RecordUpdater<E> updater)