Re: tradeoffs between serializable vs snapshot isolation for single writer

2023-05-04 Thread Ryan Blue
1) Yes, that's right. After commit time we have the serialized chain of transactions. 2) Yes, it does. If you're rewriting whole data files then the validations used to verify that the result of the transaction is unchanged are a little different. For lazy updates (merge-on-read) Iceberg has to ch

Re: tradeoffs between serializable vs snapshot isolation for single writer

2023-05-04 Thread Nirav Patel
Thanks Ryan/Szehon for responding and clarifying some concepts for me. I got my answer but just to further clarify on transactions, (not urgent but if you got time) 1) Isolation level is only check during commit. 2) does cow or merge on read has any bearing on how this transaction semantic works ?

Re: tradeoffs between serializable vs snapshot isolation for single writer

2023-05-04 Thread Szehon Ho
Whoops, I didn’t see Ryan answer already. > On May 4, 2023, at 3:18 PM, Szehon Ho wrote: > > Hi, > > I believe it only matters if you have conflicting commits. For single writer > case, I think you are right and it should not matter, so you may save very > slightly in performance by turning

Re: tradeoffs between serializable vs snapshot isolation for single writer

2023-05-04 Thread Szehon Ho
Hi, I believe it only matters if you have conflicting commits. For single writer case, I think you are right and it should not matter, so you may save very slightly in performance by turning it to Snapshot Isolation. The checks are metadata checks though, so I would think it will not be a sig

Re: tradeoffs between serializable vs snapshot isolation for single writer

2023-05-04 Thread Ryan Blue
Hi Nirav, If you only have one writer, then there is no performance cost to using serializable. The isolation level only matters if you're retrying commits and need to validate them. For serializable, Iceberg will validate that the result of the operation is the same. That is, there have been no c

tradeoffs between serializable vs snapshot isolation for single writer

2023-05-04 Thread Nirav Patel
I am trying to ingest data into iceberg table using spark streaming. There are no multiple writers to same data at the moment. According to iceberg api