Skip to content

Commit

Permalink
logs
Browse files Browse the repository at this point in the history
  • Loading branch information
dholms committed Nov 17, 2023
1 parent 134c74a commit 86c20a9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/pds/src/api/com/atproto/temp/importRepo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { Server } from '../../../../lexicon'
import AppContext from '../../../../context'
import { ActorStoreTransactor } from '../../../../actor-store'
import { AtprotoData } from '@atproto/identity'
import { httpLogger as log } from '../../../../logger'

export default function (server: Server, ctx: AppContext) {
server.com.atproto.temp.importRepo({
Expand Down Expand Up @@ -97,6 +98,7 @@ const importRepo = async (
if (roots.length !== 1) {
throw new InvalidRequestError('expected one root')
}
log.info({ did }, 'pds-v2-debug finished reading car')
outBuffer.push(`read ${blocks.size} blocks\n`)
const currRoot = await actorStore.db.db
.selectFrom('repo_root')
Expand All @@ -105,6 +107,7 @@ const importRepo = async (
const currRepo = currRoot
? await Repo.load(actorStore.repo.storage, CID.parse(currRoot.cid))
: null
log.info({ did }, 'pds-v2-debug loaded curr repo')
const diff = await verifyDiff(currRepo, blocks, roots[0])
outBuffer.push(`diffed repo and found ${diff.writes.length} writes\n`)
diff.commit.rev = rev
Expand Down

0 comments on commit 86c20a9

Please sign in to comment.