Yangsx-1 commented on code in PR #1795:
URL: https://github.com/apache/kvrocks/pull/1795#discussion_r1372511994
##########
src/types/redis_stream_base.h:
##########
@@ -167,12 +174,21 @@ struct StreamConsumerGroupMetadata {
StreamEntryID last_delivered_id;
int64_t entries_read = 0;
uint64_t lag = 0;
+ StreamEntryID max_pending_entry_id;
};
struct StreamConsumerMetadata {
uint64_t pending_number = 0;
uint64_t last_idle;
uint64_t last_active;
+ StreamEntryID min_pending_entry_id;
+ StreamEntryID max_pending_entry_id;
Review Comment:
Yes, it is a little inefficient. But only XPENDING and XINFO commands need
to iterate the whole elements, and XACK, XCLAIM will only have o(1) complexity
in this design, I think it's ok for now. @LiuYuHui
--
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]