Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/boost/boost_datastore.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ func saveData(contractHash string) {
default:
// Queue is full, skip this one (it will be retried in the next save cycle)
log.Printf("Save queue full, skipping contract: %s", contractHash)
// Do not mark as pending so it can be retried in a future save cycle
break
saveQueueMutex.Unlock()
continue
Comment on lines 116 to +119
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the default branch, log.Printf runs while saveQueueMutex is held. Logging can block (I/O) and prolong mutex hold time, which may increase contention and delay the worker’s pendingSaves cleanup under load. Consider unlocking before logging (capture contractHash first) and keeping the locked section minimal; optionally rate-limit this message to avoid log spam when the queue is full.

Copilot uses AI. Check for mistakes.
}
}
saveQueueMutex.Unlock()
Expand Down
Loading