public boolean truncatePrefix(final long firstIndexKept) {
        this.readLock.lock();
        final List<AbstractFile> willRemoveFiles = new ArrayList<>();
        try {
            for (final AbstractFile abstractFile : this.files) {
                final long lastLogIndex = abstractFile.getLastLogIndex();
                if (lastLogIndex < firstIndexKept) {
                    willRemoveFiles.add(abstractFile);
                }
            }
            return true;
        } finally {
            this.readLock.unlock();
            for (final AbstractFile file : willRemoveFiles) {
                if (file != null) {
                    file.shutdown(1000, true);
                }
            }
            deleteFiles(willRemoveFiles);
        }
    }
If file's lastLogIndex < first_index_kept , it will be destroyed
But if file's firstLogIndex < firstIndexKept < file's  lastLogIndex, it will be retained
jraft-extension/java-log-storage-impl/src/main/java/com/alipay/sofa/jraft/storage/file/FileManager.java