raystack / frontier

Frontier is an all-in-one user management platform that provides identity, access and billing management to help organizations secure their systems and data. (Open source alternative to Clerk)
https://raystack-frontier.vercel.app/
Apache License 2.0
273 stars 34 forks source link

fix: add isolation level in transaction repository #824

Closed kushsharma closed 14 hours ago

kushsharma commented 5 days ago

Currently there were chances to have race conditions while writing to transaction repository. I have added a test to verify it doesn't happen. Database is using Serializable as the isolation level to avoid overlapping transactions.

vercel[bot] commented 5 days ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
frontier ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 4, 2024 3:43am
coveralls commented 5 days ago

Pull Request Test Coverage Report for Build 12152601272

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
internal/store/postgres/group_repository.go 0 15 0.0%
internal/store/postgres/organization_repository.go 0 19 0.0%
internal/store/postgres/billing_transactions_repository.go 0 101 0.0%
<!-- Total: 4 139 2.88% -->
Files with Coverage Reduction New Missed Lines %
internal/store/postgres/billing_transactions_repository.go 2 3.06%
<!-- Total: 2 -->
Totals Coverage Status
Change from base Build 12112659884: -0.002%
Covered Lines: 7630
Relevant Lines: 24739

💛 - Coveralls