Skip to content

Commit

Permalink
add idle time filter
Browse files Browse the repository at this point in the history
  • Loading branch information
Yangsx-1 committed Jul 1, 2024
1 parent 06c85b7 commit 5220bf0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/types/redis_stream.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1758,6 +1758,10 @@ rocksdb::Status Stream::GetPendingEntries(StreamPendingOptions &options, StreamG
last_entry_id = entry_id;
}
StreamPelEntry pel_entry = decodeStreamPelEntryValue(iter->value().ToString());
if (options.with_time && util::GetTimeStampMS() - pel_entry.last_delivery_time_ms < options.idle_time) {
continue;
}

const std::string &consumer_name = pel_entry.consumer_name;

if (options.with_consumer && options.consumer != consumer_name) {
Expand Down

0 comments on commit 5220bf0

Please sign in to comment.