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

Andreas dickow patch 1 #1121

Closed

Conversation

AndreasDickow
Copy link

What does this PR do?

the pull request fixes a problem with master-master replication database setups, as often found in large scale and fail safe systems.
A race condition by database function induced timestamp generation is circumvented by avoiding django auto_add and auto_add_now options

Fixes # (issue)

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?

AndreasDickow and others added 2 commits September 20, 2023 12:54
In master-master database setups, a race condition on auto_now and auto_add_now fields leads to database crashes. Therefore the attempt_time should be determined already in django to avoid different time stamp issues on create or update statements
@codecov
Copy link

codecov bot commented Oct 8, 2023

Codecov Report

Merging #1121 (be0785a) into master (e781d67) will decrease coverage by 0.13%.
Report is 13 commits behind head on master.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #1121      +/-   ##
==========================================
- Coverage   94.63%   94.51%   -0.13%     
==========================================
  Files          34       35       +1     
  Lines        1137     1148      +11     
  Branches      209      211       +2     
==========================================
+ Hits         1076     1085       +9     
- Misses         47       48       +1     
- Partials       14       15       +1     
Files Coverage Δ
.../0009_alter_accessattempt_attempt_time_and_more.py 100.00% <100.00%> (ø)
axes/models.py 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Missing blank line
reformat models for prospector
@aleksihakli
Copy link
Member

I'm closing this as there has been no discussion on the implementation alternatives. I'm not opposed to adding this feature but it would be nice to discuss implementing this functionality without overwriting model methods and adding data layer logic.

@aleksihakli aleksihakli closed this Dec 8, 2023
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

Successfully merging this pull request may close these issues.

2 participants