Trims a stream by minimum ID. Returns the number of deleted items. */
| 878 | |
| 879 | /* Trims a stream by minimum ID. Returns the number of deleted items. */ |
| 880 | int64_t streamTrimByID(stream *s, streamID minid, int approx) { |
| 881 | streamAddTrimArgs args = { |
| 882 | .trim_strategy = TRIM_STRATEGY_MINID, |
| 883 | .approx_trim = approx, |
| 884 | .limit = approx ? 100 * server.stream_node_max_entries : 0, |
| 885 | .minid = minid |
| 886 | }; |
| 887 | return streamTrim(s, &args); |
| 888 | } |
| 889 | |
| 890 | /* Parse the arguments of XADD/XTRIM. |
| 891 | * |
no test coverage detected