Optimize database batch operations with prepared statements

- Add prepared statements to all batch operations for better performance
- Fix database lock contention by properly batching operations
- Update SQLite settings for extreme performance (8GB cache, sync OFF)
- Add proper error handling for statement closing
- Update tests to properly track batch operations
This commit is contained in:
2025-07-28 17:21:40 +02:00
parent b9b0792df9
commit 40d7f0185b
8 changed files with 721 additions and 49 deletions

View File

@@ -77,3 +77,18 @@ type ASInfo struct {
LastUpdated time.Time `json:"last_updated"`
Age string `json:"age"`
}
// LiveRouteDeletion represents parameters for deleting a live route
type LiveRouteDeletion struct {
Prefix string
OriginASN int
PeerIP string
}
// PeerUpdate represents parameters for updating a peer
type PeerUpdate struct {
PeerIP string
PeerASN int
MessageType string
Timestamp time.Time
}