Closed hungphan227 closed 10 months ago
I found CassandraEventStoreTable that contains info about the table but could not find the module that create the table. The only module I found is CassandraFilteringProjectionModule but the table is different.
rules TEXT
-> jsonb? cf: https://github.com/linagora/james-project-private/issues/750#issuecomment-1870276450
TL;DR: More complex than it seems, I would love to see a POC...
This is a tricky one, as we need transactionnality when inserting several events: they either all succeed or all fails. Partial application is not supported. I would love to see in this ticket...
... Is this feature actually used? Is there some features that relies on storing several events or is this just some convoluted complexity we can get rid of? ... We could implement this with a transaction for sure. But do we have a way to match desired consistency without resorting to such extremities? Eg: Apparently PG supports inserting several rows at once natively: https://www.postgresqltutorial.com/postgresql-tutorial/postgresql-insert-multiple-rows/
INSERT INTO
links (url, name)
VALUES
('https://www.google.com','Google'),
('https://www.yahoo.com','Yahoo'),
('https://www.bing.com','Bing');
Mixing two tickets here.
The first point about creating filters_projection table belongs to the ticket [Postgres] Implement FiltersProjectionDAO
(that Quan seemed to have picked)
I found CassandraEventStoreTable that contains info about the table but could not find the module that create the table.
CassandraEventStoreModule , same package as CassandraEventStoreTable :)
Yes ignore this comment here.
I moved it to https://github.com/linagora/james-project/issues/5029 ...
Wondering if that shouldn't be together with https://github.com/linagora/james-project/issues/5026 then. Sounds a bit too small on its own :)
bind PostgresEventStore to eventStore in EventSourcingFilteringManagement
The guice binding for PostgresEventStore
would be done in https://github.com/linagora/james-project/issues/5029.
Here is just about contract test for Filter on top of PostgresEventStore
IMO.
Already part of https://github.com/linagora/james-project/issues/5026 in DoD, closing this.
How
DoD
Pass FilteringManagementContract