Skip to content

Commit

Permalink
CBG-4431 Include delete mutations in DCP backfill
Browse files Browse the repository at this point in the history
  • Loading branch information
adamcfraser committed Dec 18, 2024
1 parent 92dd1ac commit 38883e5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions feeds.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ func (c *Collection) StartDCPFeed(
}

func (c *Collection) enqueueBackfillEvents(startCas uint64, keysOnly bool, q *eventQueue) error {
sql := fmt.Sprintf(`SELECT key, %s, %s, isJSON, cas FROM documents
WHERE collection=?1 AND cas >= ?2 AND value NOT NULL
sql := fmt.Sprintf(`SELECT key, %s, %s, isJSON, cas, tombstone FROM documents
WHERE collection=?1 AND cas >= ?2
ORDER BY cas`,
ifelse(keysOnly, `null`, `value`),
ifelse(keysOnly, `null`, `xattrs`))
Expand All @@ -143,7 +143,7 @@ func (c *Collection) enqueueBackfillEvents(startCas uint64, keysOnly bool, q *ev
}
e := event{}
for rows.Next() {
if err := rows.Scan(&e.key, &e.value, &e.xattrs, &e.isJSON, &e.cas); err != nil {
if err := rows.Scan(&e.key, &e.value, &e.xattrs, &e.isJSON, &e.cas, &e.isDeletion); err != nil {
return err
}
q.push(e.asFeedEvent(c.GetCollectionID()))
Expand Down

0 comments on commit 38883e5

Please sign in to comment.