Skip to main content
← Back to list
01Issue
FeatureShippedSwamp CLI
Assigneesstack72

Relationships

#911 Add swamp datastore sync --migrate-index CLI command to trigger shard-first migration

Opened by stack72 · 7/1/2026· Shipped 7/1/2026

Summary

swamp-club#906 added shard-first indexing to @swamp/s3-datastore and @swamp/gcs-datastore. Both extensions expose a public migrateMonolithToShards() method on their sync service, but nothing in the CLI calls it.

When commitPush detects no v2 _meta.json, it falls back to the monolith path and logs:

Index is using monolithic format. Run 'swamp datastore sync --migrate-index' to enable shard-first commits for improved concurrency.

That command does not exist yet. Users see the hint but cannot act on it.

What needs to happen

Add a --migrate-index flag to swamp datastore sync (or a dedicated swamp datastore migrate-index subcommand) that:

  1. Acquires the distributed lock
  2. Calls syncService.migrateMonolithToShards() on the active datastore extension
  3. Reports the result (the method logs "Migrated N entries into M shards in Xms")
  4. Releases the lock

The method is already implemented and tested in both extensions. This is purely CLI plumbing.

Interface

The sync service already advertises twoPhaseSync: true via capabilities(). The migrateMonolithToShards method is public on both S3CacheSyncService and GcsCacheSyncService. Core needs to:

  • Check if the sync service has a migrateMonolithToShards method (duck-type or add to the DatastoreSyncService interface in the extension)
  • Call it under the lock
  • Surface the console.info log lines the method emits
  • #906 - shard-first index extension changes (merged)
  • #812 - original lock contention issue
  • #829 - two-phase sync
02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED+ 1 MOREASSIGNED+ 7 MOREREVIEW+ 4 MOREPR_MERGED+ 1 MORENOTIFICATION_SKIPPED

Shipped

7/1/2026, 11:35:44 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack727/1/2026, 9:29:47 PM

Sign in to post a ripple.