private void loadStoresInParallel(List<Callable<MessageStore>> tasks) throws InterruptedException {
        ExecutorService executor =
                Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors() + 1);
        CompletionService<MessageStore> completionService =
                new ExecutorCompletionService<>(executor);
        for (Callable<MessageStore> task : tasks) {
            completionService.submit(task);
        }
        for (int i = 0; i < tasks.size(); i++) {
            try {
                completionService.take().get();
            } catch (Throwable e) {
                //
            }
        }
        executor.shutdown();
    }
Load stores in parallel.

@param tasks                    the load tasks
@throws InterruptedException    the exception during processing
inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/broker/msgstore/MessageStoreManager.java