slbotbm commented on code in PR #3041:
URL: https://github.com/apache/iggy/pull/3041#discussion_r3000527390


##########
core/server/src/binary/handlers/topics/create_topic_handler.rs:
##########
@@ -41,31 +38,16 @@ pub async fn handle_create_topic(
     session: &Session,
     shard: &Rc<IggyShard>,
 ) -> Result<HandlerResult, IggyError> {
-    let stream_id = wire_id_to_identifier(&req.stream_id)?;
     debug!(
-        "session: {session}, command: create_topic, stream_id: {stream_id}, 
name: {}",
+        "session: {session}, command: create_topic, stream_id: {:?}, name: {}",
+        req.stream_id,
         req.name.as_str()
     );
     shard.ensure_authenticated(session)?;
 
-    let command = CreateTopic {
-        stream_id,
-        partitions_count: req.partitions_count,
-        compression_algorithm: 
CompressionAlgorithm::from_code(req.compression_algorithm)?,
-        message_expiry: IggyExpiry::from(req.message_expiry),
-        max_topic_size: MaxTopicSize::from(req.max_topic_size),
-        replication_factor: if req.replication_factor == 0 {
-            None
-        } else {
-            Some(req.replication_factor)
-        },
-        name: req.name.to_string(),
-    };
-    command.validate()?;

Review Comment:
   I think the 1000 partition count check was happening here, but it was 
removed in the new code.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to