alibaba/nacos · error · NacosConfigException

Failed to config batch deletion

Error message

Failed to config batch deletion

What it means

Error "Failed to config batch deletion" thrown in alibaba/nacos.

Source

Thrown at config/src/main/java/com/alibaba/nacos/config/server/service/repository/embedded/EmbeddedConfigInfoPersistServiceImpl.java:535

            String idsStr = StringUtils.join(ids, StringUtils.COMMA);
            List<ConfigAllInfo> oldConfigAllInfoList =
                findAllConfigInfo4Export(null, null, null, null, ids);
            if (CollectionUtils.isNotEmpty(oldConfigAllInfoList)) {
                removeConfigInfoByIdsAtomic(idsStr);
                for (ConfigAllInfo configAllInfo : oldConfigAllInfoList) {
                    removeTagByIdAtomic(configAllInfo.getId());
                    historyConfigInfoPersistService.insertConfigHistoryAtomic(configAllInfo.getId(),
                        configAllInfo,
                        srcIp, srcUser, time, "D", Constants.FORMAL, null,
                        ConfigExtInfoUtil.getExtInfoFromAllInfo(configAllInfo));
                }
            }
            
            EmbeddedStorageContextUtils.onBatchDeleteConfigInfo(oldConfigAllInfoList);
            boolean result =
                databaseOperate.update(EmbeddedStorageContextHolder.getCurrentSqlContext());
            if (!result) {
                throw new NacosConfigException("Failed to config batch deletion");
            }
            
            return oldConfigAllInfoList;
        } finally {
            EmbeddedStorageContextHolder.cleanAllContext();
        }
    }
    
    @Override
    public void removeTagByIdAtomic(long id) {
        ConfigTagsRelationMapper configTagsRelationMapper = mapperManager.findMapper(
            dataSourceService.getDataSourceType(), TableConstant.CONFIG_TAGS_RELATION);
        final String sql = configTagsRelationMapper.delete(Collections.singletonList("id"));
        final Object[] args = new Object[] {id};
        EmbeddedStorageContextHolder.addSqlContext(sql, args);
    }
    
    @Override

View on GitHub (pinned to 9b989acdf1)

Solutions

  1. Inspect the server logs for the underlying cause, fix it, and retry the operation.

When it happens

Trigger: Thrown at config/src/main/java/com/alibaba/nacos/config/server/service/repository/embedded/EmbeddedConfigInfoPersistServiceImpl.java:535 when the library encounters an invalid state.

Common situations: Batch deletion of configs from embedded storage failed.


AI-assisted analysis of alibaba/nacos@9b989acdf1 (2026-08-14). Data as JSON: /api/errors/8b5823fb2905723d. Report an issue: GitHub.