kpatelatwork commented on a change in pull request #11132:
URL: https://github.com/apache/kafka/pull/11132#discussion_r677015394



##########
File path: 
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/rest/resources/ConnectorsResource.java
##########
@@ -269,7 +269,7 @@ public Response restartConnector(final 
@PathParam("connector") String connector,
             FutureCallback<Void> cb = new FutureCallback<>();
             herder.restartConnector(connector, cb);
             completeOrForwardRequest(cb, forwardingPath, "POST", headers, 
null, forward);
-            return Response.ok().build();
+            return Response.noContent().build();

Review comment:
       @rhauch and @kkonstantine  I confirm that from AK2.8 test the old 
behavior was returning 204, We would need to fix the documentation and KIP. 
Please see below
   
   > ➜  kafka_2.13-2.8.0 curl -v -X POST 
http://localhost:8083/connectors/local-file-source/restart
   > *   Trying ::1...
   > * TCP_NODELAY set
   > * Connected to localhost (::1) port 8083 (#0)
   > > POST /connectors/local-file-source/restart HTTP/1.1
   > > Host: localhost:8083
   > > User-Agent: curl/7.64.1
   > > Accept: */*
   > > 
   > < HTTP/1.1 204 No Content
   > < Date: Mon, 26 Jul 2021 23:41:44 GMT
   > < Server: Jetty(9.4.39.v20210325)
   > < 
   > * Connection #0 to host localhost left intact
   > * Closing connection 0
   > ➜  kafka_2.13-2.8.0




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to