Skip to content

Commit

Permalink
updates to not process docs with no attachments to migrate
Browse files Browse the repository at this point in the history
  • Loading branch information
gregns1 committed Sep 24, 2024
1 parent d45001d commit 6909c05
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions db/background_mgr_attachment_migration.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,17 +120,17 @@ func (a *AttachmentMigrationManager) Run(ctx context.Context, options map[string
return true
}

if syncData == nil || syncData.Attachments == nil {
// no attachments to migrate
return true
}

collCtx := collection.AddCollectionContext(ctx)
collWithUser := &DatabaseCollectionWithUser{
DatabaseCollection: collection,
}
if event.DataType&base.MemcachedDataTypeXattr == 0 {
// no xattrs on dcp event, check for sync data
if syncData == nil {
// no inline sync xattr, skip event
return true
}
// we have inline sync xattr to migrate
// no xattrs on dcp event we have inline sync xattr to migrate
opts := DefaultMutateInOpts()
existingDoc := &sgbucket.BucketDocument{
Cas: event.Cas,
Expand Down

0 comments on commit 6909c05

Please sign in to comment.