code: private Collection<AttributeUpdate> generateAttributeUpdates(CompactionArgs candidates) {
          return Arrays.asList(
                  new AttributeUpdate(TableAttributes.COMPACTION_OFFSET, AttributeUpdateType.ReplaceIfEquals, candidates.endOffset, candidates.startOffset),
                  new AttributeUpdate(TableAttributes.TOTAL_ENTRY_COUNT, AttributeUpdateType.Accumulate, -candidates.count));
      }
docs: Generates a Collection of {@link AttributeUpdate}s that will be applied to the Segment at the end of each compaction.
  The following {@link TableAttributes} are modified:
  - {@link TableAttributes#COMPACTION_OFFSET}: update to where we finished, so that the next compaction can resume
  from there.
  - {@link TableAttributes#TOTAL_ENTRY_COUNT}: reduce by the total number of candidates we encountered (including
  obsoletes, deletions and those that will be moved); the {@link IndexWriter} will update this back when reindexing
  the moved Table Entries.
  - {@link TableAttributes#ENTRY_COUNT}: this is not modified - it keeps track of how many Table Entries are active
  (there's an index entry for them); the IndexWriter will update it as appropriate based on the state of the Index
  at the time the moved Table Entries will be reindexed.
  
  @param candidates The Candidates for compaction.
  @return The result.