PragmaTwice commented on code in PR #1489:
URL:
https://github.com/apache/incubator-kvrocks/pull/1489#discussion_r1236220977
##########
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:
Seems the global server object is allocated directly on the stack rather
than heap, so I think it is better to put the array on heap, e.g. `std::vector`
or `std::unique_ptr<T[]>`.
--
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]