code: public void resizeTempBlockMeta(TempBlockMeta tempBlockMeta, long newSize)
        throws InvalidWorkerStateException {
      long oldSize = tempBlockMeta.getBlockSize();
      if (newSize > oldSize) {
        reserveSpace(newSize - oldSize, false);
        tempBlockMeta.setBlockSize(newSize);
      } else if (newSize < oldSize) {
        throw new InvalidWorkerStateException("Shrinking block, not supported!");
      }
    }
docs: Changes the size of a temp block.
  
  @param tempBlockMeta the metadata of the temp block to resize
  @param newSize the new size after change in bytes
  @throws InvalidWorkerStateException when newSize is smaller than oldSize