Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: modelcontextprotocol/registry
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: modelcontextprotocol/registry
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: adamj/fix-atomic-latest-version-update-2
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 2 commits
  • 5 files changed
  • 2 contributors

Commits on Sep 23, 2025

  1. Fix atomic latest version update to prevent missing isLatest flags

    Previously, updating the old latest version and creating the new version
    were separate operations that could fail independently, potentially leaving
    no version marked as isLatest. This change makes the operation atomic:
    
    - CreateServer now accepts oldLatestVersionID parameter
    - PostgreSQL implementation uses a transaction for UPDATE + INSERT atomicity
    - Service layer maintains WithPublishLock for concurrent operation serialization
    - Both mechanisms work together: lock prevents races, transaction ensures atomicity
    
    🤖 Generated with [Claude Code](https://claude.ai/code)
    
    Co-Authored-By: Claude <noreply@anthropic.com>
    domdomegg and claude committed Sep 23, 2025
    Configuration menu
    Copy the full SHA
    f711903 View commit details
    Browse the repository at this point in the history
  2. Fix atomic latest version update to prevent missing isLatest flags

    - Pass transaction via context from WithPublishLock to CreateServer
    - Use pg_try_advisory_xact_lock with retry to avoid connection pool exhaustion
    - Update test to check database state (source of truth) vs returned snapshots
    - Increase publish timeout to 60s to handle high concurrency scenarios
    - Test now passes with concurrency=100
    
    🤖 Generated with [Claude Code](https://claude.ai/code)
    
    Co-Authored-By: Claude <noreply@anthropic.com>
    domdomegg and claude committed Sep 23, 2025
    Configuration menu
    Copy the full SHA
    2454b78 View commit details
    Browse the repository at this point in the history
Loading