PragmaTwice commented on code in PR #1489:
URL: 
https://github.com/apache/incubator-kvrocks/pull/1489#discussion_r1234112107


##########
src/server/server.h:
##########
@@ -84,6 +88,16 @@ struct ChannelSubscribeNum {
   size_t subscribe_num;
 };
 
+// CURSOR_DICT_SIZE must 2^n and n < 16
+constexpr const size_t CURSOR_DICT_SIZE = 1024 * 16;
+static_assert((CURSOR_DICT_SIZE & (CURSOR_DICT_SIZE - 1)) == 0, 
"CURSOR_DICT_SIZE must 2^n and n < 16");
+static_assert(CURSOR_DICT_SIZE < (1 << 15), "CURSOR_DICT_SIZE must 2^n and n < 
16");

Review Comment:
   ```suggestion
   static_assert((CURSOR_DICT_SIZE & (CURSOR_DICT_SIZE - 1)) == 0, 
"CURSOR_DICT_SIZE must be 2^n");
   static_assert(CURSOR_DICT_SIZE < (1 << 15), "CURSOR_DICT_SIZE must be less 
than 2^16");
   ```



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