Projection Rebuild Deletes Existing Projected Documents from Archived Streams #3278
Replies: 2 comments
-
@jonfowler1231 If you want the archived events also rebuilt, set the |
Beta Was this translation helpful? Give feedback.
-
Thanks, Jeremy, for the prompt response; it's good to know this is possible. I'm new to MartenDb and am trying to figure out how to handle an ever-growing event source. My intent was to keep the existing documents. They are essentially "cold" at this point, as new events are no longer changing them. Running a full rebuild is slow and, in most cases, produces the exact same document that was just deleted. With the documents being deleted, there is a period (unnecessarily?) where the documents no longer exist, and this impacts the front-end (albeit temporarily). Is there a different feature that I should be using to achieve this? |
Beta Was this translation helpful? Give feedback.
-
When I rebuild projections, existing documents are being deleted, including those that were projected from archived streams. This behaviour seems to undermine the purpose of the archive flag, as I can no longer recreate these documents without un-archiving the streams.
Expected Behavior:
Documents projected from archived streams should remain intact and not be deleted during a projection rebuild.
Actual Behavior:
Documents projected from archived streams are deleted during a projection rebuild, making it impossible to recreate them without un-archiving the streams.
Questions:
Is this behavior intentional, and if so, how is the archive flag intended to be used in this context?
Is there a recommended workaround to prevent documents from being deleted during a projection rebuild?
Environment:
MartenDb Version: 7.19.1
Beta Was this translation helpful? Give feedback.
All reactions