private Connection getWritableConnection(String groupName) throws FdfsException {
        if (getWritableConnectionPool() == null) {
            logger.debug("open getWritableConnection...");
            Set<StorageConfig> writableStorageConfigSet = getTrackerClient().getStoreStorageSet(groupName);

            Asserts.assertCollectionIsBlank(writableStorageConfigSet, "writableStorageConfigSet is empty");

            int perSize = getFdfsClientConfig().getStorageSizePerAddr();
            int elementSize = perSize * writableStorageConfigSet.size();
            final SimpleConnectionPool connectionPool = new SimpleConnectionPool(elementSize, 3);
            for (StorageConfig storageConfig : writableStorageConfigSet) {
                InetSocketAddress inetSocketAddress = storageConfig.getInetSocketAddress();
                byte storePathIndex = storageConfig.getStorePathIndex();
                for (int i = 0; i < perSize; i++) {
                    try {
                        Connection con = super.newConnection(inetSocketAddress);
                        con.setStorePathIndex(storePathIndex);
                        connectionPool.put(con);
                    } catch (Exception e) {
                        throw new FdfsException("newConnection fail, inetSocketAddress=[" + inetSocketAddress
                                + "]" + e.getMessage(), e);
                    }
                }
            }
            setWritableConnectionPool(connectionPool);
        }
        return getWritableConnectionPool().get();
    }