Known limits
This page lists the limits of Deedbox 0.8, so you can plan around them.
- Appends take turns. One counter orders all appends. See the benchmarks for the ceiling.
- One append per transaction you own. A second append in the same transaction can deadlock with a concurrent append or with a cut-over; the database aborts one. Nothing is lost. Make one append per transaction, or run the transaction again; see use Dapper or plain ADO.NET.
- An append in your transaction can fail during a deploy. When Deedbox did not count the instance as live, the append fails with DBX038, and you run the transaction again. Deedbox repeats an append in a transaction that it owns.
- One message per event. Deedbox.QueueBox writes at most one message for each event, to one topic. To move consumers to a new contract, see change a message’s contract.
- One database per store. Database-per-tenant comes in a later release.
- Rebuilds are in place. The read model is empty or partial during a rebuild. To keep serving reads, build the new read model under a new name; see replace a read model without downtime.
- A crashed instance holds back inline switches for 30 seconds. Deedbox counts an instance as live until its heartbeat is 30 seconds old, and a new inline projection stays in catch-up while a live instance can skip it; see inline or async projections.
- Projections run one event at a time, in order.
ReadStreamreads one stream, forward. There is no backward read, no read of all streams and no filter by event type. A subscription handles the events of every stream.- The archive moves whole streams, not ranges. You archive the streams that your app considers finished. The archive does not partition a table, and it moves no event that a consumer has not applied; see table growth.
- A rebuild skips archived events. A new projection or subscription starts without them too. To replay them, rebuild with the archive included.
- The archive table keeps its rows. Do not delete or truncate rows in
deedbox.events_archive.DeleteStreamstays the only way to remove history. - Only top-level properties hold personal data.
[PersonalData]on a type nested in an event fails start-up (DBX026). - Erasure covers what Deedbox stores. Deedbox does not erase outbox rows, your read models or your other tables. Scrub them when you handle
SubjectErased. - A polymorphic member needs .NET 9 on Postgres. An event or state with a
[JsonDerivedType]member works on .NET 9 and later. On .NET 8 with Postgres, start-up fails with DBX039. - No rollback to 0.7 after an archive. Deedbox 0.7 and earlier do not read
deedbox.events_archive, so they rebuild an archived stream’s state from part of its events. An archive refuses while such an instance has a heartbeat row (DBX041), but nothing stops a later rollback. - A rollback from 0.5 can need a restore. After 0.5.0 writes storage format 2, an older version cannot read that data; see erasure and the key hierarchy.
- Start-up needs the database. Deedbox checks the schema when the host starts. Build-time OpenAPI generation starts the host too; skip hosted services when
Assembly.GetEntryAssembly()?.GetName().NameisGetDocument.Insider. - Metadata is set through
DeedboxContext. There is no ASP.NET Core helper; use the middleware shown in the tenants guide. - Isolation levels. An append in your own transaction needs READ COMMITTED. REPEATABLE READ, SERIALIZABLE and SNAPSHOT fail with DBX040.
- Two versions of one inline projection. During a rolling deploy, each instance applies its own version of an inline projection to its own appends. When you change which events an inline projection handles, finish the deploy, then rebuild the projection. For an async projection or a subscription, an instance of the version that handles fewer events leaves the checkpoint to an instance that handles more. That rule covers instances on 0.6.0 and later.
- Rebuild a projection while one version of it runs. A rebuild runs the reset of the instance that takes the job. During a rolling deploy that changes a projection, an instance of the older version leaves the job to a live instance of the newer one. An instance that joins after the job ran still replays over what the older reset left. Finish the deploy, then rebuild.
- An inline projection that handles
StreamDeletedorSubjectErasedneeds every app to run it. Every app that registers a stream type can append these events. While an instance that does not run the projection inline is live, the projection stays in catch-up; see inline or async projections. - A handler must not catch an error that ends the transaction. Some database errors roll the whole transaction back. When a handler catches one and returns, Deedbox fails the event or the append.
- A projection handler that ignores its cancellation token. After
HandlerTimeoutthe runner cancels the token and waits. It cannot stop a handler that writes in the batch’s transaction.