Skip to content

Commit 69989f2

Browse files
committed
fixes based on copilot comments
use xattr keys used during resync for compaction change error
1 parent f7f091c commit 69989f2

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

db/crud.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,7 @@ func (c *DatabaseCollection) CompactDocChannelHistory(ctx context.Context, docid
230230
return nil, base.HTTPErrorf(400, "Invalid doc ID")
231231
}
232232

233-
xattrKeys := []string{base.SyncXattrName, base.VirtualXattrRevSeqNo, base.MouXattrName}
234-
rawDoc, xattrs, cas, err := c.dataStore.GetWithXattrs(ctx, key, xattrKeys)
233+
rawDoc, xattrs, cas, err := c.dataStore.GetWithXattrs(ctx, key, c.syncGlobalSyncMouRevSeqNoAndUserXattrKeys())
235234
if err != nil {
236235
return nil, err
237236
}
@@ -254,7 +253,7 @@ func (c *DatabaseCollection) CompactDocChannelHistory(ctx context.Context, docid
254253
return nil, importErr
255254
}
256255
if doc == nil {
257-
return nil, fmt.Errorf("skipping compaction of document %s, %v ", base.UD(docid), base.ErrNotFound)
256+
return nil, base.ErrNotFound
258257
}
259258
cas = doc.Cas
260259
}

0 commit comments

Comments
 (0)