@Override
    public boolean init(final LogStorageOptions opts) {
        try {
            this.statusCheckpoint.load();
            this.isOldStorageExist = this.statusCheckpoint.isOldStorageExist;
            if (this.isOldStorageExist) {
                if (this.oldLogStorage != null) {
                    if (!this.oldLogStorage.init(opts)) {
                        LOG.warn("Init old log storage failed when startup hybridLogStorage");
                        return false;
                    }
                    final long lastLogIndex = this.oldLogStorage.getLastLogIndex();
                    if (lastLogIndex == 0) {
                        shutdownOldLogStorage();
                    } else if (lastLogIndex > 0) {
                        // Still exists logs in oldLogStorage, need to wait snapshot
                        this.thresholdIndex = lastLogIndex + 1;
                        this.isOldStorageExist = true;
                        LOG.info(
                            "Still exists logs in oldLogStorage, lastIndex: {},  need to wait snapshot to truncate logs",
                            lastLogIndex);
                    }
                } else {
                    this.isOldStorageExist = false;
                    saveStatusCheckpoint();
                }
            }

            if (!this.newLogStorage.init(opts)) {
                LOG.warn("Init new log storage failed when startup hybridLogStorage");
                return false;
            }
            return true;
        } catch (final IOException e) {
            LOG.error("Error happen when when load hybrid status checkpoint");
            return true;
        }
    }
HybridLogStorage is used to be compatible with new and old logStorage
@author hzh (642256541@qq.com)
jraft-extension/java-log-storage-impl/src/main/java/com/alipay/sofa/jraft/storage/HybridLogStorage.java