fix: resolve race condition in reply voting system#335
Conversation
|
@ash1shkumar is attempting to deploy a commit to the Karan Mani Tripathi 's projects Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Technical Review
Hi @ash1shkumar! Thank you for your contribution to DoubtDesk.
The code changes look good. Before we can complete the technical review, approve, and merge this pull request, we have one final requirement for all contributors: Please star the DoubtDesk repository.
Once you have starred the repository, please drop a comment here saying "done" (or we will automatically detect it) and we will proceed with approving and merging your PR. Thank you.
There was a problem hiding this comment.
Hello there! 🎉 Thank you so much for your first pull request to DoubtDesk!
We really appreciate your contribution. A maintainer will review your code soon. If you are participating in GSSoC, ensure your PR is linked to an open issue. Please make sure you have followed all rules in our Contributing Guidelines. Happy coding!
done |
|
Hi @knoxiboy , could you please review this PR when available? This fix addresses a backend race condition and transactional consistency issue in the reply voting system by implementing atomic DB transactions and preventing vote count desynchronization during concurrent requests. Since the issue involves concurrency handling, database integrity, and transaction-safe operations, I believe it would fit better under a Thank you! |
|
@knoxiboy , This PR fix addresses a backend race condition and transactional consistency issue in the reply voting system by implementing atomic DB transactions and preventing vote count desynchronization during concurrent requests. Since the issue involves concurrency handling, database integrity, and transaction-safe operations, I believe it would fit better under a Thank you! |
Description
Implemented a transaction-safe reply voting system to prevent race conditions and vote count desynchronization during concurrent requests.
Changes Made
db.transaction()GREATEST()Related Issue
Closes #329
Type of Change
How Has This Been Tested?
npm run devManual Testing Performed
Checklist
npm run dev)anytypes)main##Expected Level
Level3/advanced
I am contributing under GSSoC and NSoC