Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ConcurrentModificationError with multiple celeryds #5

Open
yannzz365 opened this issue Jan 11, 2011 · 1 comment
Open

ConcurrentModificationError with multiple celeryds #5

yannzz365 opened this issue Jan 11, 2011 · 1 comment

Comments

@yannzz365
Copy link

Hello,

I'm starting several celeryds having sqlakombu as a broker backend :
$ celeryd-multi start 3 -c 3
When a message is put in the queue, it seems that the consumers stomp on each other's feet when committing the 'visible' flag update :

File "XXX/lib/python2.6/site-packages/kombu_sqlalchemy-0.9.0-py2.6.egg/sqlakombu/transport.py", line 68, in _get
   self.session.commit()
[...]
File "XXX/lib/python2.6/site-packages/SQLAlchemy-0.5.8-py2.6.egg/sqlalchemy/orm/mapper.py", line 1423, in _save_obj
    raise exc.ConcurrentModificationError("Updated rowcount %d does not match number of objects updated %d" % (rows, len(update)))

What should be done ? Catch a ConcurrentModificationError and rollback, if we assume that another worker has consumed the message ?

Thanks,
Yann

@ask
Copy link
Owner

ask commented Jan 11, 2011

Interesting! The SQLAlchemy backend is still young, and I don't have much experience with SQLA. Your guess is good as mine, and catching the exception may be the solution, but maybe we should do a little research into this before deciding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants