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

Admin version check incompatible with Redis backend #362

Open
jonathan-whitall opened this issue Dec 17, 2019 · 0 comments
Open

Admin version check incompatible with Redis backend #362

jonathan-whitall opened this issue Dec 17, 2019 · 0 comments

Comments

@jonathan-whitall
Copy link

jonathan-whitall commented Dec 17, 2019

Describe the problem

The admin version check (Constance's optimistic locking strategy) requires the read of a set of config values immediately after the write of those values to return the newest values. Unfortunately, with an eventually consistent data store like redis, there is no guarantee that that will be the case. Therefore Constance should not perform this check if the backend is set to redis (or should warn the users about potential pitfalls of not disabling this with IGNORE_ADMIN_VERSION_CHECK).

Steps to reproduce

  • Set up a redis instance with a read replica
  • Set up Constance with several config values and backend pointing to that instance
  • Attempt to POST value updates on the admin screen to one of the config fields in rapid succession.
  • You will likely get the following error on the admin screen: "The settings have been modified by someone else. Please reload the form and resubmit your changes." This is because the re-read of the admin values happens from the read replica before it's updated and it therefore gets the old version number.

System configuration

  • Django version: Constance 2.4
  • Python version: 3.5.3
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

1 participant