docs: protected synchronized void maintenance() {
          // first of all we're checking, if all consumers were already registered. if not - just no-op.
          if (positions.size() < expectedConsumers) {
              log.trace("Skipping maintanance due to not all expected consumers shown up: [{}] vs [{}]", positions.size(), expectedConsumers);
              return;
          }
  
          // now we should get minimal id of consumed update
          val minIdx = maxAppliedIndexEverywhere();
          val allPositions = new long[positions.size()];
          int cnt = 0;
          for (val p:positions.values())
              allPositions[cnt++] = p.get();
  
          log.trace("Min idx: {}; last deleted index: {}; stored updates: {}; positions: {}", minIdx, lastDeletedIndex.get(), updates.size(), allPositions);
  
          // now we're checking, if there are undeleted updates between
          if (minIdx > lastDeletedIndex.get()) {
              // delete everything between them
              for (long e = lastDeletedIndex.get(); e < minIdx; e++) {
                  updates.remove(e);
              }
  
              // now, making sure we won't try to delete stuff twice
              lastDeletedIndex.set(minIdx);
              //System.gc();
          }
      }