code: void add(BucketUpdate.KeyUpdate update, int entryLength, long originalOffset) {
          val existing = this.updates.get(update.getKey());
          if (existing == null || update.supersedes(existing)) {
              this.updates.put(update.getKey(), update);
          }
  
          // Update remaining counters, regardless of whether we considered this update or not.
          this.totalUpdateCount.incrementAndGet();
          long lastOffset = update.getOffset() + entryLength;
          this.lastIndexedOffset.updateAndGet(e -> Math.max(lastOffset, e));
          if (originalOffset >= 0) {
              this.highestCopiedOffset.updateAndGet(e -> Math.max(e, originalOffset + entryLength));
          }
      }
docs: Includes the given {@link BucketUpdate.KeyUpdate} into this collection.
  
  If we get multiple updates for the same key, only the one with highest version will be kept. Due to compaction,
  it is possible that a lower version of a Key will end up after a higher version of the same Key, in which case
  the higher version should take precedence.
  
  @param update         The {@link BucketUpdate.KeyUpdate} to include.
  @param entryLength    The total length of the given update, as serialized in the Segment.
  @param originalOffset If this update was a result of a compaction copy, then this should be the original offset
  where it was copied from (as serialized in the Segment). If no such information exists, then
  {@link TableKey#NO_VERSION} should be used.