public void setAssociation(int inputId, short data) throws StorageException {
      short indexedData = getIndexedData(inputId);
      if (indexedData == data) {
        if (indexedData != 0 && EXTRA_CONSISTENCY_CHECKS) {
          var indexedSet = myInvertedIndex.get(indexedData);
          var ok = indexedSet != null && indexedSet.contains(inputId);
          if (!ok) {
            logInconsistencySameValueIndexedSetIsNullOrDoesntContainInputId(inputId, indexedData, indexedData, indexedSet == null,
                                                                            myExtraChecksInfo);
          }
        }
        return;
      }
      // indexedData != data
      if (indexedData != 0) {
        var indexedSet = myInvertedIndex.get(indexedData);
        if (indexedSet == null) {
          logInconsistencyIndexedSetIsNull(inputId, indexedData, data, myExtraChecksInfo);
        }
        else {
          var removed = indexedSet.remove(inputId);
          if (!removed) {
            final AtomicInteger keyWitness;
            if (EXTRA_CONSISTENCY_CHECKS && myInconsistenciesLogged.get() < MAX_INCONSISTENCIES_TO_LOG) {
              keyWitness = new AtomicInteger(0);
              myInvertedIndex.forEach((key, fileSet) -> {
                if (fileSet != null && fileSet.contains(inputId)) {
                  keyWitness.set(key);
                }
              });
            }
            else {
              keyWitness = null;
            }
            logInconsistencyIndexedSetValueNotRemoved(inputId, indexedData, data, keyWitness, myExtraChecksInfo);
          }
        }
      }
      myForwardIndex.set(inputId, data);
      if (data != 0) {
        myInvertedIndex.computeIfAbsent(data, __ -> createContainerForInvertedIndex()).add(inputId);
      }
      //TODO RC: should we do the notification under the lock?
      triggerOnInvertedIndexChangeCallback(data, indexedData);
    }
public void setAssociation(int inputId, short data)