Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
V3-1987: Optimize audits stats persistence #2632
Simple benchmark tests show a significant improvement between single update/transaction model vs batching within a transaction.
Still considering the single SQL call, but that will require a lot of business logic in the SQL, which would duplicate logic in Go code.
Please describe the tests:
Please describe the performance impact:
Code Review Checklist (to be filled out by reviewer)
* Added batch update stats for recordAuditSuccessStatus * Added batch update stats to recordAuditFailStatus * added configurable batch size * build individual update/delete statements so the statements can be batched into 1 call to the DB * notified #config-changes channel and ran make update-satellite-config-lock * updated tests to use batch update stats