private boolean archiveCompleteBatch(InFlightBatch inFlightBatch) {
        lock.writeLock().lock();
        try {
            log.trace("Archiving complete batch: {} for the share partition: {}-{}", inFlightBatch, groupId, topicIdPartition);
            if (inFlightBatch.batchState() == RecordState.AVAILABLE) {
                // Change the state of complete batch since the same state exists for the entire inFlight batch.
                inFlightBatch.archiveBatch(EMPTY_MEMBER_ID);
                return true;
            }
        } finally {
            lock.writeLock().unlock();
        }
        return false;
    }
Updates the cached state, start and end offsets of the share partition as per the new log
start offset. The method is called when the log start offset is moved for the share partition.

@param logStartOffset The new log start offset.
core/src/main/java/kafka/server/share/SharePartition.java