Azure / Azure/azure-documentdb-changefeedprocessor-dotnet

How to force a complete restart of a projection

Open
#123 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
51
Forks
24
PR merge metrics
No merged PRs in 30d

Description

I'm looking to restart a set of processing from the dawn of time [after processing for some time with a given prefix], discarding all progress (as opposed to the case discussed in #84 where one is indicatign the starting position one would like for a new lease collection (`StartFromBeginning`).

From my research, it seems:
- If I mint a new prefix, I seem to see all the documents (as one'd expect)
- if I use an existing lease, I can't seem to find any way via the API surface area to tell the processor I want to _really_ *Re* start From The Beginning
- There is a deprecated `DiscardExistingLeases` thing which sounds like what I want to achieve

Workarounds that spring to mind for me:
1) maintain `generation` externally, and bump that when I want to trigger reprocessing (and include that in the `LeasePrefix`)
2) perform surgery on the lease collection manually and/or with hack code as the API does not offer a way to achieve this

Am I missing something? If the only way I'm going to be able to achieve this effect is by doing one of the two things that spring to mind for me, then the xmldocs need updating to indicate that this feature does not do what it sounds like (either that, or if you can explain what use case this does fulfil, that'd work for me too)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.