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


##########
src/server/server.h:
##########
@@ -319,4 +359,8 @@ class Server {
   std::atomic<size_t> watched_key_size_ = 0;
   std::map<std::string, std::set<redis::Connection *>> watched_key_map_;
   std::shared_mutex watched_key_mutex_;
+
+  // SCAN ring buffer
+  std::atomic<uint16_t> cursor_counter_ = {0};
+  std::array<CursorDictElement, CURSOR_DICT_SIZE> cursor_dict_;

Review Comment:
   640KB is small enough for several GB servers, and we don't really need to 
save this memory. 
   The biggest advantage of `arrays` is that they are simple enough to use in 
multi-threaded environments.



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