void updatePartialLogSegmentInfo() {
    int partialCount = 0;
    long wastedSpace = 0;
    LogSegment segment = log.getFirstSegment();
    LogSegmentName journalName = null;
    if (journal.getCurrentNumberOfEntries() != 0) {
      journalName = journal.getFirstOffset().getName();
    }
    while (segment != null) {
      // exclude journal
      if (journalName != null && segment.getName().equals(journalName)) {
        break;
      }
      if (segment.getEndOffset() < segment.getCapacityInBytes() * 0.8) {
        partialCount++;
      }
      wastedSpace += segment.getCapacityInBytes() - segment.getEndOffset();
      segment = log.getNextSegment(segment);
    }
    partialLogSegmentCount.set(partialCount);
    wastedLogSegmentSpace.set(wastedSpace);
  }
Update the partial log segment info including the partialLogSegmentCount and wastedLogSegmentSpace
ambry-store/src/main/java/com/github/ambry/store/PersistentIndex.java