-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shapes with where clauses are missing updates #1659
Comments
Shapes with a where clause must include a where clause across all requests, otherwise they are treated as requests for a different shape definition (i.e. the one without a where clause). This is what's happening here, you can see that the response to the first request with |
I would suggest that if the |
I agree we should validate that shape_id must match the rest of the URl structure. |
I'll create a new issue for that. |
When a transaction inserts several rows that are partitioned over several shapes, those shapes fail to pick up the newly inserted rows.
Reproduction
Start Electric:
Connect to Postgres and create a table:
Now, get a shape that fetches all rows where
a > 2
(i'm using HTTPie here):This works fine, the result is:
Now, let's insert some more rows into the table:
Now, let's fetch the shape again from the last offset we know:
HTTP GET "localhost:3000/v1/shape/foo" offset==0_0 shape_id==71923130-1725960097628
Now Electric replies with:
**This is wrong. We were expecting to get the 2 rows we inserted.
Now insert some more rows:
And fetch again:
HTTP GET "localhost:3000/v1/shape/foo" offset==0_0 shape_id==71923130-172596009762
We see the inserted rows:
The text was updated successfully, but these errors were encountered: