We need this when we want to propoagate the new last-id of a consumer group * that was consumed by XREADGROUP with the NOACK option: in that case we can't * propagate the last ID just using the XCLAIM LASTID option, so we emit * * XGROUP SETID */
| 1409 | * XGROUP SETID <key> <groupname> <id> |
| 1410 | */ |
| 1411 | void streamPropagateGroupID(client *c, robj *key, streamCG *group, robj *groupname) { |
| 1412 | robj *argv[5]; |
| 1413 | argv[0] = shared.xgroup; |
| 1414 | argv[1] = shared.setid; |
| 1415 | argv[2] = key; |
| 1416 | argv[3] = groupname; |
| 1417 | argv[4] = createObjectFromStreamID(&group->last_id); |
| 1418 | |
| 1419 | /* We use progagate() because this code path is not always called from |
| 1420 | * the command execution context. Moreover this will just alter the |
| 1421 | * consumer group state, and we don't need MULTI/EXEC wrapping because |
| 1422 | * there is no message state cross-message atomicity required. */ |
| 1423 | propagate(server.xgroupCommand,c->db->id,argv,5,PROPAGATE_AOF|PROPAGATE_REPL); |
| 1424 | decrRefCount(argv[4]); |
| 1425 | } |
| 1426 | |
| 1427 | /* We need this when we want to propagate creation of consumer that was created |
| 1428 | * by XREADGROUP with the NOACK option. In that case, the only way to create |
no test coverage detected