Skip to content

Conversation

@gregns1
Copy link
Contributor

@gregns1 gregns1 commented Dec 18, 2025

CBG-5049

  • Switches caching feed mutex up to exclusive mutex
  • We will iterate on perf tests for this and if regresses we will revert

Pre-review checklist

  • Removed debug logging (fmt.Print, log.Print, ...)
  • Logging sensitive data? Make sure it's tagged (e.g. base.UD(docID), base.MD(dbName))
  • Updated relevant information in the API specifications (such as endpoint descriptions, schemas, ...) in docs/api

Dependencies (if applicable)

  • Link upstream PRs
  • Update Go module dependencies when merged

Integration Tests

Copilot AI review requested due to automatic review settings December 18, 2025 11:23
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR converts the change cache's locking mechanism from a read-write mutex (sync.RWMutex) to an exclusive mutex (sync.Mutex). This change simplifies the locking strategy by treating all operations uniformly, potentially addressing concurrency issues at the cost of some read concurrency. The team plans to evaluate performance impacts and may revert if there are regressions.

Key Changes:

  • Replaced sync.RWMutex with sync.Mutex in the changeCache struct
  • Updated read lock calls (RLock()/RUnlock()) to exclusive lock calls (Lock()/Unlock())

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants