You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iggy.apache.org by "krishvishal (via GitHub)" <gi...@apache.org> on 2025/07/23 20:31:16 UTC

[PR] Fix http server to use `cyper` [iggy]

krishvishal opened a new pull request, #2032:
URL: https://github.com/apache/iggy/pull/2032

   TODO: add description


-- 
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: commits-unsubscribe@iggy.apache.org

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


Re: [PR] Fix HTTP server using `compio`, `cyper` and restrict to shard 0 [iggy]

Posted by "krishvishal (via GitHub)" <gi...@apache.org>.
krishvishal commented on code in PR #2032:
URL: https://github.com/apache/iggy/pull/2032#discussion_r2241868942


##########
core/server/src/tcp/tcp_socket.rs:
##########
@@ -58,7 +58,7 @@ pub fn build(ipv6: bool, config: &TcpSocketConfig) -> Socket {
             .set_keepalive(config.keepalive)
             .expect("Unable to set SO_KEEPALIVE on socket");
         socket
-            .set_nodelay(config.nodelay)
+            .set_tcp_nodelay(config.nodelay)

Review Comment:
   I've to use `compio-net` which requires `socket2=0.6.0` and that version of `socket2` only has `set_tcp_delay` and other things I've changed.
   
   You can see that `compio` itself depends on `socket2=0.6.0`: https://github.com/compio-rs/compio/blob/master/Cargo.toml#L60
   
   I've rebased my branch with latest `io_uring_tcp`
   
   



-- 
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: commits-unsubscribe@iggy.apache.org

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


Re: [PR] Fix HTTP server using `compio`, `cyper` and restrict to shard 0 [iggy]

Posted by "numinnex (via GitHub)" <gi...@apache.org>.
numinnex commented on PR #2032:
URL: https://github.com/apache/iggy/pull/2032#issuecomment-3135504421

   LGTM! If nobody else has anything to add, let's merge this.


-- 
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: commits-unsubscribe@iggy.apache.org

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


Re: [PR] Fix HTTP server using `compio`, `cyper` and restrict to shard 0 [iggy]

Posted by "numinnex (via GitHub)" <gi...@apache.org>.
numinnex commented on code in PR #2032:
URL: https://github.com/apache/iggy/pull/2032#discussion_r2241593909


##########
core/server/src/shard/system/partitions.rs:
##########
@@ -73,6 +74,58 @@ impl IggyShard {
             partition_ids
         };
 
+        {

Review Comment:
   This does not belong in this function, if you look at the `TCP` implementation, those events are broadcasted at the `handler` level, you have to do the same with HTTP, otherwise when handling TCP requests, we will broadcast those events twice. 
   
   Same for other places that you've changed in the `shard/system` modules.



##########
core/server/src/tcp/tcp_socket.rs:
##########
@@ -58,7 +58,7 @@ pub fn build(ipv6: bool, config: &TcpSocketConfig) -> Socket {
             .set_keepalive(config.keepalive)
             .expect("Unable to set SO_KEEPALIVE on socket");
         socket
-            .set_nodelay(config.nodelay)
+            .set_tcp_nodelay(config.nodelay)

Review Comment:
   Those got changed after updating `compio` version, make sure that you've rebased your branch with latest changes, unless you had to downgrade the version of `compio` in order to get it to work with the `cyper` fork.



-- 
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: commits-unsubscribe@iggy.apache.org

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


Re: [PR] Fix HTTP server using `compio`, `cyper` and restrict to shard 0 [iggy]

Posted by "numinnex (via GitHub)" <gi...@apache.org>.
numinnex commented on code in PR #2032:
URL: https://github.com/apache/iggy/pull/2032#discussion_r2242022706


##########
core/server/src/tcp/tcp_socket.rs:
##########
@@ -58,7 +58,7 @@ pub fn build(ipv6: bool, config: &TcpSocketConfig) -> Socket {
             .set_keepalive(config.keepalive)
             .expect("Unable to set SO_KEEPALIVE on socket");
         socket
-            .set_nodelay(config.nodelay)
+            .set_tcp_nodelay(config.nodelay)

Review Comment:
   But since you've forked the `cyper` repo and replaced the `compio` dependency in there to use the same version from commit hash that we use on the server, why it can't use the same `TcpListener` that we are currently using  for the TCP implementation ? 



-- 
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: commits-unsubscribe@iggy.apache.org

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


Re: [PR] Fix HTTP server using `compio`, `cyper` and restrict to shard 0 [iggy]

Posted by "krishvishal (via GitHub)" <gi...@apache.org>.
krishvishal commented on code in PR #2032:
URL: https://github.com/apache/iggy/pull/2032#discussion_r2241864598


##########
core/server/src/shard/system/partitions.rs:
##########
@@ -73,6 +74,58 @@ impl IggyShard {
             partition_ids
         };
 
+        {

Review Comment:
   Done.



-- 
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: commits-unsubscribe@iggy.apache.org

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


Re: [PR] Fix HTTP server using `compio`, `cyper` and restrict to shard 0 [iggy]

Posted by "numinnex (via GitHub)" <gi...@apache.org>.
numinnex commented on code in PR #2032:
URL: https://github.com/apache/iggy/pull/2032#discussion_r2242032278


##########
core/server/src/tcp/tcp_socket.rs:
##########
@@ -58,7 +58,7 @@ pub fn build(ipv6: bool, config: &TcpSocketConfig) -> Socket {
             .set_keepalive(config.keepalive)
             .expect("Unable to set SO_KEEPALIVE on socket");
         socket
-            .set_nodelay(config.nodelay)
+            .set_tcp_nodelay(config.nodelay)

Review Comment:
   In fact I've checked the `tcp_socket` file and it's not used at all and won't be used in the future, since we have replaced it with the `bind_with_options` method from `compio` that I've contributed. We can ignore that completely



-- 
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: commits-unsubscribe@iggy.apache.org

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


Re: [PR] Fix HTTP server using `compio`, `cyper` and restrict to shard 0 [iggy]

Posted by "krishvishal (via GitHub)" <gi...@apache.org>.
krishvishal commented on code in PR #2032:
URL: https://github.com/apache/iggy/pull/2032#discussion_r2241868942


##########
core/server/src/tcp/tcp_socket.rs:
##########
@@ -58,7 +58,7 @@ pub fn build(ipv6: bool, config: &TcpSocketConfig) -> Socket {
             .set_keepalive(config.keepalive)
             .expect("Unable to set SO_KEEPALIVE on socket");
         socket
-            .set_nodelay(config.nodelay)
+            .set_tcp_nodelay(config.nodelay)

Review Comment:
   I've to use `compio-net` which requires `socket2=0.6.0` and that version of `socket2` only has `set_tcp_delay` and other things I've changed.
   
   You can see that `compio` itself depends on `socket2=0.6.0`: https://github.com/compio-rs/compio/blob/master/Cargo.toml#L60
   
   



-- 
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: commits-unsubscribe@iggy.apache.org

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


Re: [PR] Fix HTTP server using `compio`, `cyper` and restrict to shard 0 [iggy]

Posted by "krishvishal (via GitHub)" <gi...@apache.org>.
krishvishal commented on code in PR #2032:
URL: https://github.com/apache/iggy/pull/2032#discussion_r2241868942


##########
core/server/src/tcp/tcp_socket.rs:
##########
@@ -58,7 +58,7 @@ pub fn build(ipv6: bool, config: &TcpSocketConfig) -> Socket {
             .set_keepalive(config.keepalive)
             .expect("Unable to set SO_KEEPALIVE on socket");
         socket
-            .set_nodelay(config.nodelay)
+            .set_tcp_nodelay(config.nodelay)

Review Comment:
   I've to use `compio-net` for using compio's `TcpListener`, which requires `socket2=0.6.0` and that version of `socket2` only has `set_tcp_delay` and other things I've changed.
   
   You can see that `compio` itself depends on `socket2=0.6.0`: https://github.com/compio-rs/compio/blob/master/Cargo.toml#L60
   
   I've rebased my branch with latest `io_uring_tcp`
   
   



-- 
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: commits-unsubscribe@iggy.apache.org

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


Re: [PR] Fix HTTP server using `compio`, `cyper` and restrict to shard 0 [iggy]

Posted by "numinnex (via GitHub)" <gi...@apache.org>.
numinnex merged PR #2032:
URL: https://github.com/apache/iggy/pull/2032


-- 
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: commits-unsubscribe@iggy.apache.org

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