Rachelint commented on code in PR #1550:
URL: https://github.com/apache/horaedb/pull/1550#discussion_r1701419511


##########
src/wal/src/message_queue_impl/wal.rs:
##########
@@ -70,8 +70,13 @@ impl<M: MessageQueue> WalManager for MessageQueueImpl<M> {
         location: WalLocation,
         sequence_num: SequenceNumber,
     ) -> Result<()> {
+        let delete_to_sequence_num = if sequence_num == MAX_SEQUENCE_NUMBER {
+            MAX_SEQUENCE_NUMBER
+        } else {
+            sequence_num + 1
+        };

Review Comment:
   ```
   if sequence_num < MAX_SEQUENCE_NUMBER {
      sequence_num + 1
   } else {
       MAX_SEQUENCE_NUMBER
   }
   ```
   We should place the hot branch first.



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to