Comment 0 for bug 1545548

Revision history for this message
wangxiyuan (wangxiyuan) wrote : The subscriber should be unique in redis backend.

Now, when use redis as the storage backend, if users update a subscription in a queue. It doesn't check the legality of the new
subscriber and doesn't update the subscriber section in redis as well.

Reproduce:
1. use redis backend and ensure there is a queue (we can name it test-queue)already.
2. create a subscription :
{
    'subscriber': 'http://test-ip:8000',
    'ttl': '3600',
    'options': {}
}
3. create an other subscription:
{
    'subscriber': 'http://test-ip:8001',
    'ttl': '3600',
    'options': {}
}
4. update the second subscription:
{
    'subscriber': 'http://test-ip:8000'
}

expect: we can't update it because the subscriber is used by the first subscription.
actual: it's updated successfully.

and an other bug:
in step 4, we update the subscription:
{
    'subscriber': 'http://test-ip:8002'
}
5. create the third subscription:
{
    'subscriber': 'http://test-ip:8001'
}

expect: the third subscription should be created. because the 8001 does not be used
actual: it cant' be created.

6. create the forth subscription:
{
    'subscriber': 'http://test-ip:8002'
}
expect: the forth subscription should not be created. because the 8002 is used by the second subscription
actual: it is created successfully.