Open hungphan227 opened 1 month ago
I have tested the performance of "on conflict do nothing" and it is the same as normal insert. IMO we can use "on conflict do nothing" to make postgres impl's behavior similar to cassandra impl's
I disagree honestly. I feel like we have more of a concurrency problem in our tests on tmail. Ignoring a duplicate instead of reporting it as an error isn't the solution I think
Indepotence most of the time makes sense except in very specific places...
Regarding the states for email and mailbox changes, I don't think it does..?
But for some other tables it might make sense yes
Currently almost all insert operations in Cassandra implementation act like upsert. Meanwhile, insert operations in Postgres implementation does not allow inserting duplicate key. Probably we should make insert operations in postgres implementation similar to cassandra impl's so that behavior of postgres impl and cassandra impl are the same.
Few concerns: