azure-documentdb-changefeedprocessor-dotnet
azure-documentdb-changefeedprocessor-dotnet copied to clipboard
How to force a complete restart of a projection
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:
- maintain
generation
externally, and bump that when I want to trigger reprocessing (and include that in theLeasePrefix
) - 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)