{"record":{"id":"f7b475eb17e465d9","repo":"apache/incubator-seata","slug":"mcp-delete-call-tc-failed","errorCode":null,"errorMessage":"MCP DELETE Call TC Failed.","messagePattern":"MCP DELETE Call TC Failed\\.","errorType":"exception","errorClass":"ServiceCallException","httpStatus":null,"severity":"error","filePath":"console/src/main/java/org/apache/seata/mcp/service/impl/ConsoleRemoteServiceImpl.java","lineNumber":207,"sourceCode":"        HttpEntity<String> entity = new HttpEntity<>(headers);\n        String responseBody;\n        try {\n            ResponseEntity<String> response = executeRequest(url, HttpMethod.DELETE, entity);\n\n            responseBody = response.getBody();\n\n            if (!response.getStatusCode().is2xxSuccessful()) {\n                String errorMsg = String.format(\n                        \"MCP DELETE request returned non-success status: %s, response: %s\",\n                        response.getStatusCode(), response.getBody());\n                LOGGER.warn(errorMsg);\n                throw new ServiceCallException(errorMsg, response.getStatusCode());\n            }\n            return responseBody;\n        } catch (RestClientException e) {\n            String errorMsg = \"MCP DELETE Call TC Failed.\";\n            LOGGER.error(errorMsg, e);\n            throw new ServiceCallException(errorMsg);\n        }\n    }\n\n    @Override\n    public String putCallTC(\n            NameSpaceDetail nameSpaceDetail,\n            String path,\n            Object objectQueryParams,\n            Map<String, String> queryParams,\n            HttpHeaders headers) {\n        if (headers == null) {\n            headers = new HttpHeaders();\n        }\n        if (nameSpaceDetail == null || !nameSpaceDetail.isValid()) {\n            return \"If you have not specified the namespace of the TC/Server, specify the namespace first\";\n        } else {\n            setNamespaceHeaderAndQueryParam(nameSpaceDetail, headers, queryParams);\n        }","sourceCodeStart":189,"sourceCodeEnd":225,"githubUrl":"https://github.com/apache/incubator-seata/blob/e01f97c6db397165050caa6764020410c2c8199a/console/src/main/java/org/apache/seata/mcp/service/impl/ConsoleRemoteServiceImpl.java#L189-L225","documentation":"deleteCallTC wraps any RestClientException from the HTTP DELETE to a TC into ServiceCallException('MCP DELETE Call TC Failed.'). It indicates the delete request never got a response — connection refused, timeout, I/O error — as distinct from a TC that answered with an error status (error 118).","triggerScenarios":"Issuing a console/MCP delete while the target TC is unreachable: process down, wrong address in naming-server registry, network partition, or the delete exceeds the REST client timeout.","commonSituations":"TC crash/restart windows while an admin performs cleanup; stale TC registration after scale-down; unreachable container ports in Kubernetes networking; slow force-rollback operations exceeding the configured timeout so the outcome is unknown.","solutions":["Confirm the TC is reachable (health endpoint) before issuing deletes","Treat this exception as outcome-unknown: re-query the transaction by xid afterwards instead of blindly re-deleting","Fix stale naming-server registrations by restarting/re-registering the TC","Increase REST timeouts for long-running force operations and add idempotent retry keyed on the xid"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"if (!tcHealthEndpointReachable(tcAddr)) throw new IllegalStateException(\"TC unreachable, delete may be unsafe: \" + tcAddr);","typeGuard":null,"tryCatchPattern":"try { service.deleteCallTC(...); } catch (ServiceCallException e) { if (isTransportFailure(e)) { reQueryByXid(xid); if (stillActive) retryWithBackoff(); } else throw e; }","preventionTips":["Treat transport-failed deletes as unknown-outcome: verify by re-querying the xid","Use idempotent retry keyed on xid with bounded attempts","Monitor TC availability and skip deletes during restart windows"],"tags":["seata","console","tc","network","delete"],"backgroundTag":null,"analyzedSha":"e01f97c6db397165050caa6764020410c2c8199a","analyzedAt":"2026-08-14T10:23:53.097Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}