fix: replace xtrim with xdel to support older redis version (#8515)

Co-authored-by: Akshay S <akshay.s@juspay.in>
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
akshay-97
2025-07-29 16:02:02 +05:30
committed by GitHub
parent f6cdddcb98
commit 3d085abf38
4 changed files with 37 additions and 1 deletions

View File

@ -277,9 +277,15 @@ async fn drainer(
_ => break,
},
}
if store.use_legacy_version() {
store
.delete_from_stream(stream_name, &last_processed_id)
.await?;
}
}
if !last_processed_id.is_empty() {
if !(last_processed_id.is_empty() || store.use_legacy_version()) {
let entries_trimmed = store
.trim_from_stream(stream_name, &last_processed_id)
.await?;