fix: resync clears last_sync_ts; add live doc counts to dashboard
All checks were successful
Deploy / deploy (push) Successful in 14s
All checks were successful
Deploy / deploy (push) Successful in 14s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -178,10 +178,13 @@ def unsuspend_replica(replica_id: int, session: Session = Depends(get_session)):
|
||||
|
||||
@router.post("/{replica_id}/resync")
|
||||
async def resync_replica(replica_id: int, session: Session = Depends(get_session)):
|
||||
"""Phase 3: wipe sync_map and trigger full resync."""
|
||||
"""Wipe sync_map, reset last_sync_ts, and trigger a full resync."""
|
||||
replica = session.get(Replica, replica_id)
|
||||
if not replica:
|
||||
raise HTTPException(404)
|
||||
# Reset last_sync_ts so the sync fetches ALL master documents
|
||||
replica.last_sync_ts = None
|
||||
session.add(replica)
|
||||
# Delete all sync_map entries for this replica
|
||||
entries = session.exec(
|
||||
select(SyncMap).where(SyncMap.replica_id == replica_id)
|
||||
|
||||
Reference in New Issue
Block a user