JasperFx / marten

.NET Transactional Document DB and Event Store on PostgreSQL
https://martendb.io
MIT License
2.81k stars 445 forks source link

Projection Rebuild Deletes Existing Projected Documents from Archived Streams #3277

Closed jonfowler1231 closed 3 months ago

jonfowler1231 commented 3 months ago

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