feat(server): extend populate command with expire, fix bug that expire the same key for multiple time (#4757)

* feat(server): extend populate command with expire, fix bug that expire the same key for multiple time
This commit is contained in:
lichuang 2025-03-12 22:21:59 +08:00 committed by GitHub
parent ac33cd871b
commit 93bd52ceb8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -195,6 +195,7 @@ void DoPopulateBatch(string_view type, string_view prefix, size_t val_size, bool
stub_tx->InitByArgs(cntx->ns, local_cntx.conn_state.db_index, args_span);
sf->service().InvokeCmd(cid, args_span, &crb, &local_cntx);
}
if (expire_ttl_range.has_value()) {
uint32_t start = expire_ttl_range->first;
@ -218,7 +219,6 @@ void DoPopulateBatch(string_view type, string_view prefix, size_t val_size, bool
sf->service().InvokeCmd(cid, args_span, &crb, &local_cntx);
}
}
}
local_tx->UnlockMulti();
}