Skip to content

Commit

Permalink
fix(dynamodb): INSERT events not processed when multiple tables are p…
Browse files Browse the repository at this point in the history
…resent

There seems to be a bug where INSERT events aren't processed by the stream consumer (only for apps that have more than one table).

The workaround stops reusing the same host (and container) and instead creates one container per table.
  • Loading branch information
skyrpex committed Mar 27, 2024
1 parent 54e310a commit 5d78bd8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion dynamodb/dynamodb.sim.w
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,12 @@ pub class Table_sim impl dynamodb_types.ITable {
pub connection: dynamodb_types.Connection;

new(props: dynamodb_types.TableProps) {
this.host = Host.of(this);
// Ideally, we would reuse the same host (and container) for all tables in the same stack,
// but there seems to be a bug somewhere that prevents INSERT events from being processed
// where there's more than one table in the application.
//
// So, instead of `this.host = Host.of(this);`, we just:
this.host = new Host();

let tableName = props.name ?? this.node.addr;
let state = new sim.State();
Expand Down

0 comments on commit 5d78bd8

Please sign in to comment.