{"record":{"id":"26eab0f96856bab4","repo":"apache/incubator-seata","slug":"not-support-putconfig","errorCode":null,"errorMessage":"not support putConfig","messagePattern":"not support putConfig","errorType":"exception","errorClass":"NotSupportYetException","httpStatus":null,"severity":"warning","filePath":"config/seata-config-apollo/src/main/java/org/apache/seata/config/apollo/ApolloConfiguration.java","lineNumber":137,"sourceCode":"            }\n        }\n        return instance;\n    }\n\n    @Override\n    public String getLatestConfig(String dataId, String defaultValue, long timeoutMills) {\n        ConfigFuture configFuture =\n                new ConfigFuture(dataId, defaultValue, ConfigFuture.ConfigOperation.GET, timeoutMills);\n        configOperateExecutor.submit(() -> {\n            String result = config.getProperty(dataId, defaultValue);\n            configFuture.setResult(result);\n        });\n        return (String) configFuture.get();\n    }\n\n    @Override\n    public boolean putConfig(String dataId, String content, long timeoutMills) {\n        throw new NotSupportYetException(\"not support putConfig\");\n    }\n\n    @Override\n    public boolean putConfigIfAbsent(String dataId, String content, long timeoutMills) {\n        throw new NotSupportYetException(\"not support atomic operation putConfigIfAbsent\");\n    }\n\n    @Override\n    public boolean removeConfig(String dataId, long timeoutMills) {\n        throw new NotSupportYetException(\"not support removeConfig\");\n    }\n\n    @Override\n    public void addConfigListener(String dataId, ConfigurationChangeListener listener) {\n        if (StringUtils.isBlank(dataId) || listener == null) {\n            return;\n        }\n        LISTENER_SERVICE_MAP","sourceCodeStart":119,"sourceCodeEnd":155,"githubUrl":"https://github.com/apache/incubator-seata/blob/e01f97c6db397165050caa6764020410c2c8199a/config/seata-config-apollo/src/main/java/org/apache/seata/config/apollo/ApolloConfiguration.java#L119-L155","documentation":"ApolloConfiguration implements Configuration but Apollo is a read-only config center from seata's perspective — publish operations are not implemented. putConfig therefore throws NotSupportYetException('not support putConfig') instead of silently pretending success. This is a deliberate capability declaration, not a bug.","triggerScenarios":"Calling Configuration instance putConfig(dataId, content, timeoutMills) when config.type=apollo; code that generically publishes config at runtime (e.g. tooling that works against Nacos/Consul configs) run against Apollo; ConfigurationFactory building an Apollo-backed configuration and some component attempting a write.","commonSituations":"Migrating seata config backend from Nacos (which supports publish) to Apollo without auditing write paths; scripts or admin tools that push config to all environments; seata-server startup tasks that attempt to write config in some flows.","solutions":["Remove or disable the config-publish code path when using Apollo.","Publish Apollo config through Apollo's own portal/OpenAPI instead of seata's Configuration API.","Switch config.type to a writable backend (nacos, consul, etcd) if programmatic publish is a hard requirement.","Catch NotSupportYetException and log a clear message if the write is optional."],"exampleFix":"// before\nconfiguration.putConfig(\"service.vgroupMapping.myTx\", \"default\", 5000);\n\n// after\ntry {\n    configuration.putConfig(\"service.vgroupMapping.myTx\", \"default\", 5000);\n} catch (NotSupportYetException e) {\n    LOGGER.warn(\"Config publish unsupported for {}; use the Apollo portal\", configuration.getTypeName());\n}","handlingStrategy":"try-catch","validationCode":"\"apollo\".equals(configuration.getTypeName()) // skip publish when true","typeGuard":null,"tryCatchPattern":"try {\n    configuration.putConfig(dataId, content, timeoutMills);\n} catch (NotSupportYetException e) {\n    LOGGER.warn(\"config publish not supported by backend {}; use its native tooling\", configuration.getTypeName());\n}","preventionTips":["Feature-flag config writes by backend type before calling publish APIs","Manage Apollo config exclusively through its portal/OpenAPI","When porting between config centers, audit every Configuration write call site"],"tags":["apollo","config","unsupported-operation","seata"],"backgroundTag":null,"analyzedSha":"e01f97c6db397165050caa6764020410c2c8199a","analyzedAt":"2026-08-14T10:23:53.097Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}